Presence detection using mobile agents in peer-to-peer networks

ABSTRACT

Embodiments of a system and method for using mobile agents in peer-to-peer networks to gather presence information for determining active peers in groups of peers. In one embodiment, a mobile agent may be launched by an initiating peer in a peer group to attempt to visit each member peer in a peer group. The itinerary of the mobile agent may include information for accessing each member peer of the peer group. The mobile agent may return to its initiating peer with a payload indicating which of the member peers it was successful in contacting and visiting. When the mobile agent returns to the originating peer, the originating peer may update presence information indicating presence of member peer nodes in the group in accordance with the indications provided by the mobile agent.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to computer networks, and more particularly to implementing mobile agents in peer-to-peer networks.

[0003] 2. Description of the Related Art

[0004] The Internet has three valuable fundamental assets—information, bandwidth, and computing resources—all of which are vastly underutilized, partly due to the traditional client-server computing model. No single search engine or portal can locate and catalog the ever-increasing amount of information on the Web in a timely way. Moreover, a huge amount of information is transient and not subject to capture by techniques such as Web crawling. For example, research has estimated that the world produces two exabytes or about 2×10¹⁸ bytes of information every year, but only publishes about 300 terabytes or about 3×10¹² bytes. In other words, for every megabyte of information produced, only one byte is published. Moreover, Google claims that it searches about only 1.3×10{circumflex over ( )}₈ web pages. Thus, finding useful information in real time is increasingly difficult.

[0005] Although miles of new fiber have been installed, the new bandwidth gets little use if everyone goes to one site for content and to another site for auctions. Instead, hot spots just get hotter while cold pipes remain cold. This is partly why most people still feel the congestion over the Internet while a single fiber's bandwidth has increased by a factor of 10{circumflex over ( )}6 since 1975, doubling every 16 months.

[0006] New processors and storage devices continue to break records in speed and capacity, supporting more powerful end devices throughout the network. However, computation continues to accumulate around data centers, which have to increase their workloads at a crippling pace, thus putting immense pressure on space and power consumption.

[0007] Finally, computer users in general are accustomed to computer systems that are deterministic and synchronous in nature, and think of such a structure as the norm. For example, when a browser issues a URL (Uniform Resource Locator) request for a Web page, the output is typically expected to appear shortly afterwards. It is also typically expected that everyone around the world will be able to retrieve the same page from the same Web server using the same URL.

[0008] The term peer-to-peer networking or computing (often referred to as P2P) may be applied to a wide range of technologies that greatly increase the utilization of information, bandwidth, and computing resources in the Internet. Frequently, these peer-to-peer technologies adopt a network-based computing style that neither excludes nor inherently depends on centralized control points. Apart from improving the performance of information discovery, content delivery, and information processing, such a style also can enhance the overall reliability and fault-tolerance of computing systems.

[0009]FIGS. 1A and 1B are examples illustrating the peer-to-peer model. FIG. 1A shows two peer devices 104A and 104B that are currently connected. Either of the two peer devices 104 may serve as a client of or a server to the other device. FIG. 1B shows several peer devices 104 connected over the network 106 in a peer group. In the peer group, any of the peer devices 104 may serve as a client of or a server to any of the other devices.

SUMMARY OF THE INVENTION

[0010] Embodiments of a system and method for using mobile agents in peer-to-peer networks to gather presence information for determining active peers in groups of peers are described. In one embodiment, a mobile agent may be launched by an initiating peer in a peer group (e.g. at varying or periodic intervals) to attempt to visit each member peer in a peer group. The itinerary of the mobile agent may include information for accessing each member peer of the peer group (e.g. an advertisement for a mobile agent input pipe for each of the member peers). The mobile agent may return to its initiating peer with a payload indicating which of the member peers it was successful in contacting and visiting (or alternatively indicating which of the member peers it was unsuccessful in contacting and visiting).

[0011] In one embodiment, the peer group may be implemented in a peer-to-peer network implemented according to a peer-to-peer platform which includes one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, join peer groups, and send and receive mobile agents in the peer-to-peer environment. In one embodiment, pipes implemented according to the peer-to-peer platform may be used to send the mobile agent between peer nodes on the itinerary. In one embodiment, each peer in a peer group may advertise an input pipe for receiving incoming mobile agents, e.g. when a particular module (e.g. service, application, etc.) is active. A peer may generate and launch a mobile agent to detect peer group member presence. The mobile agent may include an itinerary of advertised pipes for member peers. The mobile agent may travel to each member peer in its itinerary, and return to the originating peer when done. The originating peer may then access the mobile agent's payload to determine current peer group presence at the time of the mobile agent's visit(s). In one embodiment, mobile agents may be used by modules (e.g. services, applications, etc.) to detect peer group presence of other instances of the module in the peer group.

[0012] When a presence mobile agent arrives at a peer on its itinerary, the peer may update the return payload, and then may attempt to contact a next peer on the itinerary. In one embodiment, the peer may acquire the pipe advertisement from the itinerary (or alternatively acquire the pipe advertisement from elsewhere using information in the itinerary). If the pipe advertisement is acquired, the peer may attempt to open the advertised pipe. If successfully opened, the peer may attempt to send a message with appropriately updated “To”, “Itinerary”, and “Return payload” fields to the input pipe specified by the advertisement. If the above is successful, the mobile agent arrives at the next itinerary hop. If failure occurs at any point, then the next “hop” on the itinerary may be selected and the above repeated until the mobile agent successfully reaches a “hop” on the itinerary or is returned to the originating peer if no “hops” are reached.

[0013] When the mobile agent returns to the originating peer, the originating peer may update presence information indicating presence of member peer nodes in the group in accordance with the indications provided by the mobile agent. In one embodiment, the peer may subsequently launch the mobile agent with an itinerary indicating member peer nodes indicated as present in the peer group as indicated by the updated presence information. In one embodiment, the peer may provide the presence information to other member peer nodes in the group. In one embodiment, the peer may launch mobile agents including itineraries of member peer nodes in other groups of peers in which the peer is a member to update presence information for the other peer groups.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014]FIG. 1A illustrates a prior art example of two devices that are currently connected as peers;

[0015]FIG. 1B illustrates a prior art example of several peer devices connected over the network in a peer group;

[0016]FIG. 2 illustrates one embodiment of peer-to-peer platform software architecture at the conceptual level;

[0017]FIG. 3 illustrates an exemplary content identifier according to one embodiment;

[0018]FIG. 4 illustrates a point-to-point pipe connection between peers according to one embodiment;

[0019]FIG. 5 illustrates a peer-to-peer platform message format according to one embodiment;

[0020]FIG. 6 illustrates the content of a peer advertisement according to one embodiment;

[0021]FIG. 7 illustrates the content of a peer group advertisement according to one embodiment;

[0022]FIG. 8 illustrates the content of a pipe advertisement according to one embodiment;

[0023]FIG. 9 illustrates the content of a service advertisement according to one embodiment;

[0024]FIG. 10 illustrates the content of a content advertisement according to one embodiment;

[0025]FIG. 11 illustrates the content of an endpoint advertisement according to one embodiment;

[0026]FIG. 12 illustrates protocols and bindings in a peer-to-peer platform according to one embodiment;

[0027]FIG. 13 illustrates discovery through a rendezvous proxy according to one embodiment;

[0028]FIG. 14 illustrates discovery through propagate proxies according to one embodiment;

[0029]FIG. 15 illustrates using messages to discover advertisements according to one embodiment;

[0030]FIG. 16 illustrates one embodiment of using peer resolver protocol messages between a requesting peer and a responding peer;

[0031]FIG. 17 illustrates one embodiment of using peer information protocol messages between a requesting peer and a responding peer;

[0032]FIG. 18 illustrates several core components and how they interact for discovery and routing according to one embodiment;

[0033]FIG. 19 illustrates one embodiment of message routing in a peer-to-peer network that uses the peer-to-peer platform;

[0034]FIG. 20 illustrates traversing a firewall in a virtual private network when access is initiated from outside only according to one embodiment;

[0035]FIG. 21 illustrates email exchange through an email gateway according to one embodiment;

[0036]FIG. 22 illustrates traversing a firewall when access is initiated from the inside according to one embodiment;

[0037]FIG. 23 illustrates embodiments of a peer-to-peer platform proxy service, and shows various aspects of the operation of the proxy service;

[0038]FIG. 24 illustrates a method of using a proxy service for peer group registration according to one embodiment;

[0039]FIG. 25 illustrates peer group registration across a firewall according to one embodiment;

[0040]FIG. 26 illustrates a method of providing peer group membership through a proxy service according to one embodiment;

[0041]FIGS. 27A and 27B illustrate a method of providing privacy in the peer-to-peer platform according to one embodiment;

[0042]FIGS. 28A and 28B illustrate one embodiment of a method for using a peer-to-peer platform proxy service as a certificate authority;

[0043]FIG. 29A illustrates a peer in a peer-to-peer network publishing an advertisement according to one embodiment;

[0044]FIG. 29B illustrates a peer in a peer-to-peer network publishing an advertisement to a rendezvous peer according to one embodiment;

[0045]FIG. 30 illustrates discovering advertisements according to one embodiment;

[0046]FIG. 31 illustrates a tiered architecture for abstracting software modules according to one embodiment;

[0047]FIG. 32 illustrates a tiered architecture for abstracting software modules according to another embodiment;

[0048]FIG. 33 illustrates a module class advertisement, a module specification advertisement, and a module implementation advertisement for a software module according to one embodiment;

[0049]FIG. 34 illustrates a computing device configured to handle a mobile agent according one embodiment;

[0050]FIG. 35 illustrates peers in a peer-to-peer network using a mobile agent according to one embodiment;

[0051]FIG. 36 illustrates a pipe used by a mobile agent in a peer-to-peer environment implemented according to the exemplary peer-to-peer platform;

[0052]FIG. 37 illustrates a mobile agent according to one embodiment;

[0053]FIG. 38 illustrates a peer creating a mobile agent itinerary according to one embodiment;

[0054]FIG. 39 illustrates a peer generating and using a mobile agent according to one embodiment;

[0055]FIG. 40 illustrates a peer receiving and processing a mobile agent according to one embodiment; and

[0056]FIG. 41 illustrates a mobile agent operating from peer to peer in a peer-to-peer network according to one embodiment;

[0057]FIG. 42 illustrates a member peer in a peer group using a mobile agent to detect peer group member presence according to one embodiment;

[0058]FIG. 43 is a flowchart illustrating detecting presence in a peer group using a mobile agent according to one embodiment;

[0059]FIG. 44 is a flowchart illustrating collaborative content control in a peer group using a mobile agent according to one embodiment;

[0060]FIG. 45 illustrates a host peer operating in response to a mobile agent configured to perform version control according to one embodiment;

[0061]FIG. 46 is a flowchart illustrating using a mobile agent to detect unauthorized copies of content according to one embodiment;

[0062]FIG. 47 illustrates a host peer operating in response to a digital rights management mobile agent according to one embodiment;

[0063]FIG. 48 is a flowchart illustrating a peer node using a mobile agent to collect trust evaluations from a plurality of peer nodes according to one embodiment;

[0064]FIG. 49 illustrates a host peer operating in response to a mobile agent configured to gather reputation information according to one embodiment;

[0065]FIG. 50A illustrates trust relationships between peers and between peers and codat according to one embodiment;

[0066]FIG. 50B illustrates peers in a “web of trust” according to one embodiment;

[0067]FIG. 51 illustrates a typical computer system that is suitable for implementing various embodiments of the decentralized trust mechanism;

[0068]FIG. 52 illustrates an exemplary architecture of a peer implementing a trust mechanism according to one embodiment;

[0069]FIG. 53A illustrates a codat confidence table according to one embodiment;

[0070]FIG. 53B illustrates a peer confidence table according to one embodiment;

[0071]FIG. 53C illustrates a peer group-independent peer confidence table according to one embodiment;

[0072]FIG. 54 illustrates one embodiment of a table of trust values with corresponding significances or meanings;

[0073]FIG. 55 illustrates a trust spectrum according to one embodiment;

[0074]FIG. 56A illustrates a certificate confidence table according to one embodiment; and

[0075]FIG. 56B illustrates a certificate confidence table comprising confidences in using a given peer's certificate for securing a transaction and confidences in the peer as a recommender, or certificate cosigner.

[0076] While the invention is described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the invention is not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

[0077] Embodiments of a system and method for implementing mobile agents in peer-to-peer (P2P) networking environments are described. A mobile agent may be software configured to operate on different nodes in a network and gather information or perform some service on host nodes in the network for a program, system, or user. For example, a mobile agent may be created on one node in a network, start executing on that node, be transferred to another node, and continue executing on that other node. A mobile agent may be configured to perform one or more operations on network nodes hosting the mobile agent. A mobile agent may be configured to navigate through the network from node to node according to an itinerary.

[0078]FIG. 34 illustrates a device 1300 (also referred to herein as a node) including a processor 1301, memory 1302 coupled to the processor 1301, and one or more network connections 1303, for participating as a peer node in a peer-to-peer network according to one embodiment. The network connection(s) may be according to any specification enabling the computing device 1300 to exchange data in a network, including, but not limited to: wired and wireless connections, Ethernet, Universal Serial Bus (USB), serial, and parallel connections. Memory 1302 may include an implementation of a peer 200. In one embodiment, peer 200 may be implemented according to a peer-to-peer platform. An exemplary peer-to-peer platform for implementing a peer-to-peer network including peers such as peer 200 and groups of peers in which mobile agents as described herein may be implemented is described later in this document.

[0079] Peer 200 may be implemented as one or more software modules or as part of a program, application, or operating system. In one embodiment, at least part of the peer 200 may be implemented in hardware. In one embodiment, peer 200 may include data corresponding to other peers accessible through the network connection 1303 that may form part of at least one peer group with peer 200. In one embodiment, peer 200 may include information regarding communications channels (e.g. pipes as described for the exemplary peer-to-peer platform described below) for connecting peer 200 to other peers. Peer 200 may also include data corresponding to other resources in the network accessible through network connection 1303, such as services and data available from other peers. In one embodiment, memory 1302 may include data corresponding to other nodes reachable through network connection 1303 that are not peer nodes.

[0080] In one embodiment, a peer 200 may include a mobile agent handler 1402 for initiating mobile agents and handling received mobile agents. In one embodiment, the mobile agent handler 1402 may be implemented according to a peer-to-peer platform such as the exemplary peer-to-peer platform described below. The mobile agent handler 1402 may enable peer 200 to use mobile agents among the services, programs, or tools available to function within or interact with the peer-to-peer network. Mobile agent handler 1402 may be implemented in any of a variety of ways including, but not limited to, as a software module (e.g. a service or application), a demon, and a daemon. While mobile agent handler 1402 is illustrated as part of peer 200, in other embodiments mobile agent handler 1402 may be a stand-alone program or other software module in memory 1302 separate from peer 200, or alternatively may be implemented on a different device and/or peer and accessed by peer 200 via the network.

[0081]FIG. 35 illustrates peers in a peer-to-peer network using a mobile agent according to one embodiment. An initiating peer 200A may generate a mobile agent 1400 to perform one or more tasks on and/or to gather information from other peers 200 in the peer-to-peer network. In one embodiment, peers 200 may include mobile agent handlers 1402 for initiating mobile agents 1400 and handling received mobile agents 1400. Mobile agent 1400 may include an itinerary of one or more peers 200 which the mobile agent is to attempt to visit in the peer-to-peer network. In one embodiment, mobile agent 1400 may be transmitted on communications channels in the peer-to-peer network from the initiating peer 200A to a first peer 200 in the itinerary, from the first peer to a second peer, and so on, in the order the peers 200 are scheduled to be visited in the itinerary, until the mobile agent returns to the initiating peer 200A after visiting, or at least attempting to visit, each peer of the itinerary.

[0082] A mobile agent 1400 may be transmitted as data using a virtual communication channel, such as a pipe implemented according to the exemplary peer-to-peer platform described below. The mobile agent 1400 may be transmitted as part of a message or generally in a format according to one or more data transmission protocols of the peer-to-peer network. The mobile agent 1400 may be transmitted in multiple parts and the transmission may be performed through multiple routes. In one embodiment, an initiating peer 200A may use a plurality of communication channels or pipes. Duplicate parts may be transmitted to provide redundancy and to avoid losing parts of the mobile agent. In one embodiment, any communications between peers 200 may be duplicative, in one-or more parts, and/or along different paths to provide redundancy.

[0083] In FIG. 35, mobile agent 1400 is shown visiting peer 200B, then 200D, and finally returning to initiating peer 200A when all peers 200 on the itinerary are visited. Peers 200C and 200E are not on the itinerary, and thus are not visited by mobile agent 1400. In one embodiment, mobile agent 1400 may not return to the initiating peer, but may terminate at the last peer (e.g. peer 200D) in the itinerary. In one embodiment, mobile agent 1400 may return to the initiating peer 200A one or more times on its itinerary. In one embodiment, a peer 200 may be visited more than once on mobile agent 1400's itinerary. In one embodiment, if the initiating peer 200A is not accessible upon completing the itinerary, the mobile agent 1400 may wait on another peer 200 for the initiating peer 200A to become available. In one embodiment, if a peer 200 on the itinerary is not accessible when the mobile agent 1400 attempts to visit the peer, the mobile agent 1400 may skip the peer and attempt to visit a next peer 200 on the itinerary. In one embodiment, the mobile agent 1400 may attempt to visit a skipped peer 200 later in its itinerary.

[0084] On each visited peer 200, mobile agent 1400 may perform or cause to be performed one or more tasks such as executing one or more software modules (applications, services, etc.), executing a script, collecting information from the visited peer 200 to be returned to the initiating peer 200A, or any other computer-performable task or combination of tasks which the mobile agent is configured to perform or initiate on visited peers 200. In one embodiment, mobile agent 1400 may store information it gathers from visited peers and delivers the information to the initiating peer 200A when it returns after completing the itinerary. In one embodiment, information collected by the mobile agent 1400 may be returned to the initiating peer 200A one or more times from visited peers 200 on the itinerary.

[0085] Continuing with FIG. 35, in one embodiment, mobile agent handlers 1402 may be implemented as services in a peer-to-peer network implemented with one or more of the peer-to-peer platform protocols of the exemplary peer-to-peer platform described below. The peer-to-peer platform protocols may provide a framework for dealing with the complexity and dynamic nature of peer-to-peer networks, where one cannot depend on a particular peer to be available at a given moment in time. In this embodiment, mobile agents 1400 may use the peer-to-peer platform protocols, including the pipe protocol, as the basis for the mobile agents' itineraries to hide the complexity of the peer-to-peer network from various modules (e.g. services, applications, etc.) that may use mobile agents 1400.

[0086] As described above, in one embodiment, mobile agents 1400 may be used in peer-to-peer networks implemented according to the exemplary peer-to-peer platform described below. In this embodiment, pipes as described for the exemplary peer-to-peer platform may be used as communications channels, and the itinerary may include advertisements for pipes corresponding to the peers 200 to be visited on the itinerary. FIG. 36 illustrates a pipe used by a mobile agent in a peer-to-peer environment implemented according to the exemplary peer-to-peer platform. When mobile agent 1400 is to visit a peer 200B on the itinerary, a pipe advertisement 808 (e.g. pipe advertisement 808A) corresponding to the peer 200B in its itinerary may be used to establish a “virtual” communications channel (a pipe), as described for the exemplary peer-to-peer platform, on the peer-to-peer network from the peer 200A on which the mobile agent 1400 currently resides to the peer 200B to be next visited. In one embodiment, the mobile agent 1400 may include the pipe advertisement 808. In another embodiment, the mobile agent 1400 may include information identifying the pipe advertisement 808 that may be used to access the pipe advertisement. In one embodiment, this information may include a pipe identifier for the pipe (e.g. a URI, URN or UUID as described for the exemplary peer-to-peer platform described below). The mobile agent 1400 may then be transmitted lo to the peer 200B via the pipe. Transmitting the mobile agent 1400 may be performed from an output pipe 204 of the peer 200A to an input pipe 202 of peer 200B indicated in the advertisement 808A, as described for embodiments of the exemplary peer-to-peer platform.

[0087] In one embodiment, peers 200 may generate mobile agent input pipes 202 for use by mobile agents. When a peer 200 such as peer 200B of FIG. 36 generates a mobile agent input pipe 202, the mobile agent input pipe may be advertised as described below for the exemplary-peer-to-peer platform protocols, and thus may be available for any mobile agent 1400 that may desire to visit the associated peer 200. In one embodiment, when the input pipe 202 is active, the input pipe may be associated with a process (e.g. daemon) running on the associated peer 200 which will receive peer-to-peer platform message(s) with an itinerary and mobile agent as elements. In one embodiment, an initiating mobile agent handler 1402 may generate a list of mobile agent input pipes 202 as an initial itinerary for a generated mobile agent 1400 by performing a search (e.g. discovery) in the peer-to-peer platform advertisement space for input pipes belonging to the module (e.g. service or application) for which the mobile agent is targeted.

[0088] The mobile agent 1400 may then be launched as one or more peer-to-peer platform messages including the mobile agent 1400 and the itinerary 1420. The one or more peer-to-peer platform messages may then move from pipe to pipe (i.e. from peer to peer) in the itinerary until the itinerary is exhausted, and then return to the initiating peer 200, if possible. In one embodiment, unavailable peers 200 may be skipped, or alternatively may be visited later in the itinerary if they become available. If an input pipe 202 in the itinerary is not “listening” when the mobile agent attempts to access it, then the mobile agent may postpone the visit and try another input pipe in the itinerary. If no input pipes 202 are listening, the mobile agent may wait on a particular peer or alternatively migrate to a peer-to-peer platform relay peer as described below, and wait for a peer on the itinerary to become active (i.e. for the input pipe of the peer to start “listening”). In one embodiment, the mobile agent may include a “timeout” period for which it will wait for a peer or peer to become active before giving up and returning to the initiating peer.

[0089] In one embodiment, the mobile agent may generate a payload that may be included in the peer-to-peer platform message(s) including the mobile agent and itinerary being passed from peer to peer. When the mobile agent returns to the initiating peer, the payload may be extracted from the message(s) and used by the module (e.g. service, application, etc.) associated with this mobile agent.

[0090]FIG. 37 illustrates a mobile agent 1400 according to one embodiment that may be generated by a peer for use in a peer-to-peer network. In one embodiment, a mobile agent 1400 may include one or more functions 1410 and an itinerary 1420 for performing one or more tasks on peers in the peer-to-peer network as specified in the itinerary 1420. In one embodiment, a mobile agent 1400 may include a payload 1431 that may be used to store results from the operation of the mobile agent 1400. In one embodiment, a mobile agent 1400 may include a certificate 1432 or other data that may be used in identification, authentication and/or authorization of the mobile agent 1400. Embodiments of mobile agents 1400 may include other data as may be desired or necessary for the operation(s) of the mobile agents 1400. Data stored in a mobile agent may be of variable size, for example growing as the mobile agent 1400 gathers more results to store as its payload 1431. Other components of a mobile agent 1400 may also change size during the life cycle and operations of the mobile agent 1400. The payload 1431 may be accessible to the peer 200, its applications, programs, services, modules, users, hardware, or other computing elements.

[0091] In one embodiment, a mobile agent handler may generate the mobile agent 1400 for the initiating peer. The mobile agent handler may be on the same node as the initiating peer, or alternatively may be on a different node. In one embodiment, a peer may function as a mobile agent handler.

[0092] Components of a mobile agent 1400 may be selected and configured to generate a mobile agent 1400 for performing one or more tasks within the peer-to-peer network. For example, an initiating mobile agent handler may select and organize an itinerary 1420. The itinerary 1420 may include data indicating network resources such as peer-to-peer communications channels (e.g. advertisements for pipes as described for the exemplary peer-to-peer platform described below), peers, and/or other network resources for navigating a peer-to-peer network, as indicated at 1421A-C, which the mobile agent may use or to attempt to reach during operation. For example, the mobile agent 1400 may be implemented in a peer-to-peer network implemented in accordance with the exemplary peer-to-peer platform described below, and the itinerary data may include references (e.g. advertisements) to pipes 1−n, as indicated at 1421A-C, where n is a positive integer. The itinerary data 1421 may be ordered or formatted according to a structure indicating how a mobile agent may navigate from peer to peer.

[0093] The initiating mobile agent handler may also configure function 1410 to indicate operations to occur on hosts of the mobile agent. Some or all of the operations may be performed on host peers in the peer-to-peer network depending on certain conditions or parameters of the mobile agent and/or host peer. For example, function 1410 may determine how the mobile agent may use or follow the itinerary 1420 or what operations may be performed on peers the mobile agent reaches. Peers may include or function as mobile agent handlers for the mobile agent. Function 1410 may be configured to perform one or more tasks on peers on the mobile agent's itinerary. Function 1410 may enable a mobile agent to operate with at least limited autonomy from its initiating mobile agent handler and/or mobile agent handlers of peers on the mobile agent's itinerary. Function 1410 may be a program, a script, or other element that is executable or otherwise produces computation on host peers. For example, a mobile agent may include a script, and a host peer's mobile agent handler may perform computation corresponding to the script. Alternatively, a mobile agent may include executable code, and a host peer's mobile agent handler may enable that code to execute.

[0094] In one embodiment, function 1410 may include executable code that may be executed on one or more host peers to perform operations as configured by its initiating mobile agent handler. For example, function 1410 may run as a program or application on a host peer. In one embodiment, a host peer's mobile agent handler may access the mobile agent and execute operations corresponding to function 1410 without treating the mobile agent 1400 or function 1410 as a program or application. For example, function 1410 may be a script, which the host mobile agent handler may follow to perform computation and return data. In one embodiment, computational control remains with the host peer's mobile agent handler, so that the host peer's mobile agent handler may terminate any computation related to a mobile agent that the peer hosts. In one embodiment, operations of a mobile agent may be performed in one or more of a plurality of ways, and an operating system or other system of the host peer may select a computational framework for the mobile agent, such as a virtual machine or a program space, which may implement a mobile agent handler. Whether the mobile agent executes as an application, or an application native to the host peer performs the operations in response to the mobile agent, the mobile agent may be considered to perform operations according to the configuration of its host peer and/or function 1410.

[0095] Function 1410 may be configured to interact in various ways with the peers hosting the mobile agent. For example, function 1410 may be configured to respond to identification requests from host peers, to request data according to one or more protocols, or otherwise exchange information and services with its host peers. Function 1410 of a mobile agent may be configured to update internal data structures of the mobile agent according to its interactions within the peer-to-peer network and/or its host peers. In one embodiment, function 1410 may be configured to update internal data structures of its host peers. In one embodiment, data may be stored as part of function 1410, including the payload data 1431 or data for responding to identification requests from host peers, such as a certificate 1432. Similarly, the mobile agent may receive data from its host peers, and function 1410 may be configured to store the data received as part of the mobile agent. In one embodiment, the itinerary 1420 may be stored as part of function 1410.

[0096] In one embodiment, a mobile agent handler may create a mobile agent without a function 1410 if mobile agent handlers that host the mobile agent are configured to provide a default or assumed function (e.g. as part of an agreed-upon protocol) and the initiating peer wants the default or assumed operations to be performed. Default functions may reduce the use of bandwidth, as the mobile agent may be smaller. In one embodiment, a mobile agent may include only itinerary 1420. In one embodiment, mobile agents may be configured to perform one or more of a variety of default or assumed functions.

[0097] In one embodiment, a mobile agent including only itinerary 1420 may operate in the peer-to-peer network as a peer discovery mobile agent. A peer discovery mobile agent may travel from peer to peer according to its itinerary to detect whether the peers are still active in the network. Peers hosting such a mobile agent may enable this function according to the specification of a peer-to-peer platform and/or appropriate protocols, such as the exemplary peer-to-peer platform and peer-to-peer platform protocols described below.

[0098] Function 1410 may be configured to compile results data as part of its operation on host peers and store that data as payload 1431. In one embodiment, the results data may be stored as part of function 1410. In one embodiment, the results data may be stored as part of itinerary 1420, for example by amending the data in itinerary 1420 to indicate results corresponding to each peer in the itinerary 1420. The results data may be available to the initiating peer upon the mobile agent returning to the initiating peer. In one embodiment, a mobile agent handler of the initiating peer may extract the payload 1431 from the mobile agent.

[0099] In one embodiment, results data may be sent to the initiating peer from a peer hosting the mobile agent 1400. In one embodiment, if the mobile agent 1400 cannot or does not return to its home initiating peer, the mobile agent 1400 may send the results data to the initiating peer. For example, a mobile agent 1400 may include a timer such that the mobile agent may expire with the timer and the results gathered by the mobile agent at that time may be returned to the initiating peer. Sending only results data instead of the mobile agent 1400 as a whole may save bandwidth. In one embodiment, results data are sent to the initiating peer as gathered by the mobile agent 1400. In one embodiment, a mobile agent 1400 may have a size limit and may return to its initiating peer node when approaching or exceeding that size limit to provide the data collected to the home peer before resuming the itinerary. In one embodiment, the size limit may be 4 kilobytes or some other size appropriate to avoid wasting bandwidth in the peer-to-peer network. Results data stored within a mobile agent 1400 may be available to host peers of the mobile agent 1400 so that the data may be shared with at least some other peers. In one embodiment, function 1410 may set access parameters concerning data that may be used or gathered from its mobile agent 1400 by host peers.

[0100] In one embodiment, function 1410 may be configured to perform more complex operations on host peer nodes. Embodiments may allow peers to handle mobile agents with different or enhanced functions. In one embodiment, a mobile agent may be configured to collect a plurality of different data or perform two or more different services. Host peer nodes may collect or be configured to provide additional data or services to host the mobile agent(s) depending on the requirements of the mobile agent(s) that may be used in the peer-to-peer environment. In one embodiment, the protocols implemented by a peer-to-peer platform such as the exemplary peer-to-peer platform described below may provide operations that may be combined to enable mobile agents to implement a variety of functions.

[0101]FIG. 38 illustrates a peer creating a mobile agent itinerary, for example as described in FIG. 37, according to one embodiment. The initiating peer or mobile agent handler may access data regarding communications channels (e.g. pipes as described for the exemplary peer-to-peer platform described below) in the peer-to-peer network to generate an itinerary, as indicated at 1451. The pipe data may be part of advertisements in the peer-to-peer network. In one embodiment, other data available to the initiating peer regarding the peer-to-peer network and its peers may be accessed. Some of the pipes information may indicate whether the corresponding pipes may be dedicated for mobile agents or for other purposes and an itinerary may include pipes that are configured to be at least compatible with mobile agents, as indicated at 1452. In one embodiment, pipe information may be pre-sorted, so that a mobile agent handler may access the appropriate storage to access pipes through which mobile agents may be sent. In one embodiment, a mobile agent handler may distinguish between pipes based on other factors relevant to the purpose of the mobile agent. For example, a mobile agent may be created to access a type of databases or find other peers in one of a plurality of peer-to-peer network. A mobile agent handler may then search for advertisements indicating peers that may provide access to such databases or limit the search to advertisements with the appropriate peer-to-peer network.

[0102] A mobile agent handler may then select from the available data a list of pipes from which to form an itinerary, as indicated at 1453. In one embodiment, peers may be reached through different pipes and a mobile agent handler may select from the options available. The mobile agent handler may then order the data, as indicated at 1454, which may indicate some preference of the initiating mobile agent handler as to how the mobile agent using that itinerary should proceed. In one embodiment, a mobile agent handler may generate an ordered data set while or before selecting the different pipes to be included in an itinerary. For example, a mobile agent handler may rank pipes by reliability to provide a mobile agent a chance to travel as far as possible and select pipes in that order. In one embodiment, the data may not be pipes and the mobile agent handler may determine navigation information from that data to include in an itinerary similarly, such that the navigation information may abstract the details of the peer-to-peer network topology and/or provide for dynamic handling of node failures. The mobile agent handler may then include the data set produced as an itinerary as part of a mobile agent, as indicated at 1455. In one embodiment, a mobile agent handler may format and include the pipe data during selection, and may perform an ordering of that pipe data in a mobile agent itinerary at any time before the mobile agent is launched.

[0103] In one embodiment, the initiating mobile agent handler may select data corresponding to some known peers of its peer and organize it to create itinerary 1420, such as by including information regarding some peers as well as communication channels in the peer-to-peer network. For example, the initiating mobile agent handler may select data concerning peers in one peer group. The data may be ordered in various ways, for example according to when there last was communication between the initiating peer and those peers, other factors, or combination of factors regarding networks and network communications, including volume of traffic, connectivity, topology, or node reliability.

[0104] In one embodiment, a mobile agent may be structured to include data regarding its home peer, its unique identification data, a time-to-live or timer, a current destination, an itinerary, and a function. The function may be one or more Java classes executable on one or more nodes in the network. The itinerary may be a list of remaining navigation to be performed, such as pipes to use or peers to visit. The current destination may be derived from the itinerary data and each host peers may update the current destination and itinerary. The time-to-live or timer may specify how long a mobile agent may wait on a host for a connection to open or a peer to be reachable before abandoning its attempts and trying another connection or peer in accord with the itinerary. In one embodiment, the time-to-live or timer may indicate how long a mobile agent may operate in the peer-to-peer network.

[0105]FIG. 39 illustrates a mobile agent handler generating and using a mobile agent according to one embodiment. A mobile agent handler may generate a mobile agent in response to an event. The event may be part of a program, clock, timer, operating system, network protocol or message, or other computing event that invokes or generates a request for a mobile agent. In one embodiment, the event may be a program or other computing element invoking a function of a peer-to-peer platform implemented using a mobile agent. Some events may not prompt the creation of a mobile agent, for example if the requesting program or user is not authorized to invoke mobile agents.

[0106] As indicated at 1501, a mobile agent handler may gather network data and generate a mobile agent. The mobile agent may include itinerary data derived from the network data gathered. The network data gathered and used, as well as the type of the mobile agent generated, may depend on the event prompting the creation of the mobile agent. Different types of mobile agents may be created in response to different factors to tailor mobile agents for particular tasks. For example, the initiating peer may be part of a plurality of peer groups, but the application prompting the mobile agent may operate in only one peer group, so that the mobile agent created may be configured through its itinerary data to operate on peers in that peer group. For example, only communication channels between peers of that peer group may be included in the itinerary. Similarly, an initiating mobile agent handler may customize the configuration of the mobile agent's operations. For example, an application on the initiating peer may request verification of the status of the other peers in one or more peer groups. In response, a mobile agent handler of the peer may create a mobile agent for discovering the status of peers in the corresponding peer groups. The initiating mobile agent handler may configure the mobile agent to gather data indicating the status of at least some peers indicated in the itinerary. In one embodiment a module, part of the operating system, or other software of the peer may be responsible for generating mobile agents for the peer, its applications, or other users of the peer-to-peer network.

[0107] As part of gathering peer data as indicated at 1501, a peer or its mobile agent handler may compile itinerary data for its mobile agent indicating one or more other peers for the mobile agent to visit. The data may represent communication channels in the peer-to-peer network that imply visiting the peer(s) forming the end-point(s) of each communication channel. In one embodiment, an itinerary including communication channel data may indicate that a mobile agent may travel through a plurality of communication channels before operating on the end-point peer. Any data accessible by the initiating peer may be selected and used to produce an itinerary if that data may be helpful to the mobile agent in moving to the desired peers or through the desired communication channels. For example, the itinerary data may be gathered from data the initiating peers has regarding known peers, existing pipes, the network topology, or generally data about network resources or configuration. In one embodiment, the initiating peer may interact with other nodes in the network to obtain data that may be used in creating the mobile agent, particularly the itinerary. The itinerary may be derived from a plurality of sources, including advertisements, user name data, pipe data, and other data indicating resources and peers in the network accessible to the initiating peer. Different sources of information may be available in different network implementations or in different implementations of a network. In one embodiment, a peer may compile data in anticipation of the data being useful when creating mobile agents and itineraries.

[0108] A mobile agent handler may include data in the mobile agent indicating its peer as the initiating peer. For example, an ordered itinerary in the mobile agent may indicate the initiating peer by including references to the initiating peer at the end of the itinerary. In one embodiment, by default the last peer data in the itinerary data of a mobile agent corresponds to its initiating peer. In one embodiment, data corresponding to the initiating peer may be stored as part of another data structure of the mobile agent rather than as part of the itinerary.

[0109] The initiating mobile agent handler may create the itinerary as an ordered list of peers with information regarding each peer, such as location or address in a network. The itinerary data may be organized similarly to a database, with a record containing one or more entries for each peer in the itinerary. In one embodiment, an initiating mobile agent handler may configure a mobile agent to process itinerary data formatted according to one or more structures and may format the itinerary data included in the mobile agent accordingly. In one embodiment, the initiating mobile agent handler may use a format that is recognizable by potential host peers of the mobile agent, for example according to a standard format defined by peer-to-peer protocols or the peer-to-peer platform implemented. The itinerary data may be a list of peers, and the list may be ordered to reduce the time and complexity for the mobile agent to process or use it. The mobile agent may be configured to visit at least some of the peers indicated in its itinerary. In one embodiment, the mobile agent may be configured to dynamically select which peer it may next visit rather than follow an ordering that may be indicated by the itinerary data. For example, a mobile agent may select the next peer to visit from peers listed in its itinerary data and the status of the network around its host. Network status may take into account various factors, such as traffic, bandwidth, topology, and number of hops to reach a peer. A mobile agent may be configured to eliminate peers from consideration for its next destination, for example depending on whether going to that peer would be too time consuming, would add to network congestion around a peer, would result in the peer running out of time, or similar factors.

[0110] After generating the mobile agent, the initiating mobile agent handler may attempt to contact another peer, as indicated at 1502. The initiating mobile agent handler may determine the peer to contact according to the itinerary for the mobile agent. In one embodiment, the initiating mobile agent handler or peer provides the mobile agent resources for the mobile agent to attempt to contact a next peer. For example, the initiating peer may enable the mobile agent to execute and access hardware and/or software resources, such as a network connection. To attempt to contact the next peer, the initiating mobile agent handler may use information indicating an appropriate communication channel. For example, an initiating mobile agent handler may access data indicating an input pipe. The initiating mobile agent handler may test the communication channel or pipe, or open one, to the next peer over to which to transmit the mobile agent. The mobile agent handler may use appropriate peer-to-peer protocols. In one embodiment, an adequate channel is a pipe suitable for transmission of a mobile agent where the peer at the other end is configured to receive a mobile agent.

[0111] The initiating mobile agent handler may determine whether successful contact was established with the next peer to which the mobile agent may be sent, as indicated at 1503. For example, the initiating mobile agent handler may communicate with a mobile agent handler on the next peer. The initiating mobile agent handler may wait for indication of successful contact for a specified amount of time. For example, the creating mobile agent handler may wait for a message indicating that a pipe was successfully established according to peer-to-peer protocols. In one embodiment, the initiating mobile agent handler may “ping” the next peer, for example by sending a message and waiting for a response indicating the next node may receive the mobile agent. If contact is not successful, the initiating mobile agent handler may update the mobile agent, as indicated at 1504. For example, the initiating mobile agent handler may amend or update the itinerary of the mobile agent to reflect that contact could not be established with the corresponding peer. The initiating mobile agent handler may try to contact another peer as the next peer for the mobile agent to visit, as indicated at 1502 and described above. In one embodiment, if the next peer is the initiating peer or the itinerary of the mobile agent is empty, the initiating mobile agent handler may terminate the mobile agent and/or use information derived from the failure to contact itinerary peers. For example, in network advertisements concerning peers that could not be contacted may be purged. If the initiating mobile agent handler establishes contact with a peer to which to send the mobile agent, the initiating mobile agent handler may launch the mobile agent to that next peer, as indicated at 1505. After launching the mobile agent, the initiating mobile agent handler-may wait for the mobile agent to return, as indicated at 1506, with its payload. The mobile agent may return to its initiating peer in response to a time-out, after completing the itinerary, or generally as configured.

[0112] As indicated at 1507, the initiating mobile agent handler may extract payload data from the mobile agent. The payload data may be used to update peer advertisements, network topology data, or other data structures containing information regarding resources in the peer-to-peer network. In one embodiment, the results data may be passed to a program or other potential user of the information, for example by creating advertisements based on the information and disseminating them through the peer-to-peer network.

[0113] In one embodiment, the initiating mobile agent handler sends and receives the mobile agent over one or more virtual communication channels. In one embodiment, the channels may be controlled or monitored by a program configured to handle mobile agents. For example, a daemon may be associated with one or more virtual communication channels of the peer-to-peer network. A daemon is a program executing directly over an operating system that may provide an engine or environment so that a mobile agent may operate on the host peer through the daemon. A mobile agent handler may include or be implemented as a daemon. For example, a peer may include a daemon, as software and/or hardware, to handle service requests and resources for mobile agents, which may be a mobile agent handler daemon. In one embodiment, a program monitoring one or more communication channels may be configured to similarly provide an engine for one or more mobile agents.

[0114] The initiating mobile agent handler or peer may activate or otherwise execute the mobile agent after it is generated. For example, the initiating peer or mobile agent handler may execute the mobile agent or any executable part of the mobile agent as a stand-alone application. Alternatively, the initiating peer may pass the mobile agent to a daemon, so that its function may be executed in that computational environment. The daemon may provide a more secure computational environment in which to execute a mobile agent. For example, memory access of the mobile agent may be intercepted and verified by the daemon to ensure the mobile agent does not impermissibly affect other programs or resources of the peer hosting the mobile agent. In one embodiment, the mobile agent may execute through a demon, within a virtual machine, or in any other computation environment provided by the host peer. A demon may be similar to a daemon but part of a larger application program, so that the function provided by a mobile agent may operate as part of an application for example. The computation environment provided by a host peer to a mobile agent may depend on the level of trust afforded by or security concerns of the host peer with respect to the mobile agent. For example, some environments for the mobile agent may be more secure or may put more limitations than others on a mobile agent.

[0115] The mobile agent may operate as configured to perform one or more of its assigned tasks. In one embodiment, if a mobile agent makes impermissible requests or operations, crashes, or otherwise cannot operate within the environment provided by a host peer, a host peer may suspend the operations of the mobile agent. In one embodiment, the host peer or mobile agent handler may delete the mobile agent to free resources allocated to the suspended mobile agent. The host mobile agent handler may access data included in the mobile agent, for example data regarding the initiating peer of the mobile agent and/or accumulated payload data. The host mobile agent handler may notify the initiating peer of the mobile agent status. The host mobile agent handler may send at least some of the payload data to the host peer.

[0116] In one embodiment, an initiating mobile agent handler may be configured to launch the mobile agent after it is created without activating, executing, or following instructions from the mobile agent. For example, the initiating mobile agent handler may treat the mobile agent software as non-executable data to include in a message. In one embodiment, the initiating mobile agent handler may enable the mobile agent to execute to launch itself to its next location but may intercept and/or restrict any other operations of the mobile agent. The mobile agent may determine a peer on which to relocate from its itinerary data and interact with the initiating mobile agent handler to find a communication channel and use it to be sent to that other peer. In one embodiment, sending the mobile agent involves duplicating the data from the initiating peer to the next peer. So that multiple copies of the mobile agent exist briefly in the peer-to-peer network, the copy of the mobile agent on the initiating peer may be then be deleted.

[0117]FIG. 40 illustrates a peer or its mobile agent handler receiving and handling a mobile agent according to one embodiment. A mobile agent handler may receive the mobile agent, as indicated at 1601, through a communication channel, such as a pipe. In one embodiment, the mobile agent is sent from a peer in at least one peer group of the receiving peer and may be routed through one or more nodes in the network. The mobile agent may conform to protocols of the peer-to-peer platform and may be received as part of a message according to one or more network communication protocols. In one embodiment, a daemon or program other than the mobile agent handler may be associated with a communication channel to monitor for mobile agents and the receiving peer may receive- the mobile agent over that communication channel.

[0118] The receiving peer or mobile agent handler may determine whether to host the mobile agent, as indicated at 1602, based on its configuration and/or the configuration of the mobile agent received. In one embodiment, the determination of whether to host a mobile agent is made by the mobile agent handler, a daemon, or other program configured to handle mobile agents for the receiving peer. The receiving mobile agent handler may refuse to host the mobile agent on its peer depending on one or more factors, including security and availability of resources. For example, a receiving peer or its mobile agent handler may already be handling a large number of other applications or mobile agents and may be configured to reject other requests until current tasks terminate. A receiving peer may not have sufficient memory available to host the received mobile agent, particularly if the receiving peer is configured to limit the amount of memory that may be used by mobile agents at a given time.

[0119] In one embodiment, the receiving mobile agent handler may obtain data from the mobile agent to determine whether to host that mobile agent. For example, a mobile agent may include data identifying the mobile agent, such as a unique identification number or certificate, for example as shown at 1432 in FIG. 37. Identifying data may include credentials or certificates according to peer-to-peer protocols or other standard defined by the peer-to-peer protocols. The mobile agent handler may access the identifying data and verify it, for example against a database in the network or on the receiving peer. In one embodiment, the mobile agent structure conforms to peer-to-peer protocols indicating the data in the mobile agent that may be identifying data, for example by labeling that data using XML tags according to a peer-to-peer protocol. In one embodiment, the mobile agent may include an interface that may be used to obtain data from the mobile agent, including identifying data of the mobile agent. If the identifying data is not appropriate or sufficient for the receiving peer, the mobile agent handler, a daemon, another program, or the receiving peer generally may decline to provide an engine for the mobile agent or to follow any instructions from the mobile agent, as indicated at 1602. Alternatively, the mobile agent may be hosted on the receiving peer, as indicated at 1602. In one embodiment, it may be determined that the mobile agent received was initiated from the current peer and may proceed as indicated at 1507 in FIG. 39.

[0120] A peer hosting the mobile agent may perform the operations of the mobile agent, as indicated at 1603. For example, the host peer, a mobile agent handler, or some other program of the host peer may perform operations according to instructions included in the mobile agent. In particular, a host mobile agent handler may access a script in the mobile agent and perform computation according to that script. In one embodiment, the host mobile agent handler may perform the operation by executing executable code of the mobile agent. The mobile agent may be executed as a stand-alone program or within a computation framework such as a virtual machine, a program space, a daemon, a demon, or other engine enabling the execution of the mobile agent functions provided by the host peer. The computing environment provided for the mobile agent may be configured according to security, permissions, or other parameters and settings that may affect how mobile agent functions are performed.

[0121] The host mobile agent handler may update one or more of the internal data structures of the mobile agent, as indicated at 1604, in response to operation according to the mobile agent configuration. In on embodiment, where the mobile agent may be executing as an application on the host peer, the mobile agent may modify data in its data structure in response to its operation. The structure and/or content of the mobile agent may be changed during operations according to the mobile agent configuration. For example, new peers may be added or removed from the itinerary, data concerning peers in the itinerary may be added to the mobile agent, the function of the mobile agent may be modified, or data may be re-organized.

[0122] In one embodiment, the host mobile agent handler may access some data stored internally as part of performing operations in response to the mobile agent. The host mobile agent handler may update the internal data of the mobile agent to indicate address, configuration, location, status, or provide some other information regarding its peer. For example, the host mobile agent handler may be configured to access advertisements, such as advertisements according to peer-to-peer protocols, and compile data for including in the mobile agent. The host peer may invoke some of its local or network services on behalf of the mobile agent. For example, the host peer may include functions for data search and the operations of the mobile agent may concern the availability of particular data on peers, so that the host peer may invoke the data search service to determine if it includes that data.

[0123] In one embodiment, the host mobile agent handler may access data corresponding to peers, services, data, or other resources in the peer-to-peer network from its internal data structures or network resources. The host mobile agent handler may amend the itinerary of the mobile agent received to include additional peers for the mobile agent to visit. For example, the mobile agent received may have been launched to discover or test the status of peers in a peer-to-peer network or peer group with an itinerary including data for a number of peers known to the initiating peer. The host mobile agent handler may include data indicating other peers in the network that were not included originally on the itinerary of the mobile agent. In one embodiment, the host mobile agent handler may amend the itinerary data of the mobile agent to include these other peers. In one embodiment, the host mobile agent handler may be configured to look for information indicating peers or other resources previously unknown to the received mobile agent corresponding to configuration parameters for the operation of the mobile agent. The host mobile agent handler may then add to the itinerary or other data structure of the mobile agent collected data relevant to the mobile agent according to configuration parameters of the mobile agent and/or the host peer. For example, the mobile agent may have been created to discover certain types of peers for the initiating peer, such as peers that have certain data, provide certain services, have certain connections, or have some other property or combination of properties in the peer-to-peer network.

[0124] In one embodiment, the host mobile agent handler may access data stored as part of a received mobile agent to update its own internal data structures and may pass it on to its peer. For example, the mobile agent may include more up-to-date data about peers of the host peer. The host mobile agent handler may retrieve some of the data from the mobile agent or may use interfaces or services provided by the mobile agent to obtain data from the mobile agent. In one embodiment, the host mobile agent handler may update data within local data structures in response to the operations of the mobile agent or may enable the mobile agent to modify, add, and/or delete data from local data structures. In one embodiment, a host mobile agent handler may request data from the mobile agent and may format the requests according to a peer-to-peer protocol. A host mobile agent handler may change the function of a mobile agent. For example, part of the function of a mobile agent may be to return its results to its initiating peer, but its initiating peer may have failed. A host mobile agent handler may adopt a mobile agent by amending the configuration of the mobile agent to have the mobile agent return its results to its current host. The host mobile agent handler may similarly change other aspects of the mobile agent, and a host mobile agent handler may reformat a mobile agent to enable the mobile agent to operate in a different network, for example. A host mobile agent handler may change elements of a mobile agent in response to instructions from the mobile agent.

[0125] After the host mobile agent handler completes or ends the operations of the mobile agent's function, the host mobile agent handler may attempt to relocate the mobile agent to another peer according to the itinerary of the mobile agent. The itinerary may be an amended itinerary. The host mobile agent handler may access the itinerary data of the mobile agent to determine a next peer to which to send the mobile agent. The host mobile agent handler may access the itinerary data through a service or interface of the mobile agent. In one embodiment, the host mobile agent handler may invoke a function of the mobile agent that returns data corresponding to the next peer the mobile agent is configured to visit.

[0126] The host mobile agent handler or peer may attempt to contact the next peer to which to send the mobile agent, as indicated at 1605. The host mobile agent handler may use an existing communication channel to the next peer if available or may establish a connection if required. The host mobile agent handler may follow or use protocols of the peer-to-peer network to establish a peer-to-peer connection with the next node. In one embodiment, the host mobile agent handler establishes a pipe to the next peer. If a first contact attempt is not successful, for example if the next peer is not responding, the host mobile agent handler may repeat its attempts. As indicated at 1606, if a host mobile agent handler cannot contact the next peer, the host mobile agent handler may interact with the mobile agent and select another peer as the next peer for the mobile agent. The host mobile agent handler may update the data included in the mobile agent, as indicated at 1604. For example, the host mobile agent handler may amend the mobile agent and/or notify the mobile agent to indicate the failure to reach the next peer. The host mobile agent handler may also interact with the mobile agent as described above to determine another next peer, as indicated at 1605.

[0127] Upon successfully connecting with a next peer for the mobile agent to visit according to the configuration of the mobile agent and/or the host peer, the host mobile agent handler may send the mobile agent to the next peer, as indicated at 1607. The mobile agent may be sent over a communication channel opened or created when contacting the next peer. A peer that hosted a mobile agent may close communication channels or pipes that were opened or used by the mobile agent. In one embodiment, a next peer may be determined before or while the operations of the mobile agent proceed.

[0128]FIG. 41 illustrates the operation of a mobile agent according to one embodiment. A mobile agent handler in a peer-to-peer network may create the mobile agent. The mobile agent may include data identifying its initiating peer in the peer-to-peer network, for example a peer identifier of the exemplary peer-to-peer platform described below. In one embodiment, a mobile agent may be configured as described in FIG. 37. In one embodiment, a mobile agent handler, an application, a program, software, and/or hardware of a peer may be configured to generate the mobile agent for operating in a peer-to-peer network as part of or through a peer-to-peer platform implemented on the peer, such as the exemplary peer-to-peer platform described below. The mobile agent may be configured to gather data from peers and/or perform various operations in the peer-to-peer network.

[0129] A mobile agent may be launched to another peer in the network, as indicated at 1701. An itinerary of the mobile agent may include data corresponding to its destination in the network. The initiating mobile agent handler may set-up the parameters for communication, format the mobile agent for sending to the next peer, and launch the mobile agent. The mobile agent may be transmitted between the initiating peer and the next peer. In one embodiment, as parts of the mobile agent are generated, the initiating peer may send them to the next peer before or while other parts may be generated. In one embodiment, rather than handle the details of launching a mobile agent directly, the initiating peer or mobile agent handler may configure the mobile agent to handle its launch and navigation of the network according to its itinerary and enable the mobile agent to operate according to that configuration. For example, the initiating peer may act as a host peer for the mobile agent. For example, its mobile agent handler may activate the mobile agent as an application with access to resources of the initiating peer such as a network connection. The mobile agent may then determine a next peer to visit, arrange for a communication channel to that next peer, and then be launched to the next peer using the communication channel. An initiating peer that enables a mobile agent to operate or execute may behave toward the mobile agent as a host peer. The mobile agent may be configured to use a pipe as the communication channel and may operate through the peer-to-peer platform implemented on the initiating peer.

[0130] In one embodiment, a duplicate of the mobile agent is transmitted from the initiating peer to the next peer. The copy on the initiating peer may be deleted after the mobile agent is launched, for example after receiving confirmation of the transmission from the next peer. The execution state of the mobile agent, for example the data in the heap, stack, and other data structures may be reflected in the mobile agent as transmitted to the next peer to enable the next peer to host the mobile agent to properly execute the mobile agent. For example, a new host for the mobile agent may configure a memory space for the mobile agent with the settings and data that the mobile agent had on its last host before launching, so that the mobile agent may pick up execution where it was left off. In one embodiment, a mobile agent may put its internal data in a state enabling it to restart computation from scratch at a new host peer. For example, the mobile agent may perform updates to its itinerary and other data structures so that when the mobile agent is next executed it need not be aware of previous operations on other hosts; a host peer may execute the mobile agent as a new program.

[0131] In one embodiment, the mobile agent launches to a next peer, as indicated at 1701, through a designated pipe of the peer-to-peer network that has the next peer as its end-point. The pipe end-point may be monitored on the next peer, for example by a mobile agent handler, a daemon or other program configured to handle data received through the pipe. An initiating peer may create a pipe in the network to the next peer to form a peer-to-peer connection over which to launch the mobile agent. In one embodiment, the mobile agent may be routed through one or more nodes of the network forming parts of the pipe before reaching the next peer. For example, the initiating peer may implement a peer-to-peer platform that is configured to provide a protocol for establishing a peer-to-peer connection to another node in the network implementing a similar peer-to-peer platform. The protocol may establish a communication channel to enable peer-to-peer interaction between the initiating peer and the next peer. The communication channel may involve one or more connections and nodes in the network, so that the mobile agent may travel through one or more network nodes between its initiating peer and the next peer on its itinerary.

[0132] After reaching the next peer, the mobile agent may access its host mobile agent handler or peer, as indicated at 1702. For example, the mobile agent may obtain access to resources on the host peer such as memory, network resources, and/or processor time for the mobile agent to perform its functions. In one embodiment, the mobile agent may be configured to request resources of its host peer. Accessing the host peer may involve housekeeping functions such as allocating memory, declaring methods, and/or establishing an interface with other elements of the host peer. The mobile agent may be configured to provide the host peer information regarding services the mobile agent may provide. For example, the mobile agent may provide data indicating interfaces of the mobile agent according to a peer-to-peer protocol. The host peer may interact with the mobile agent by invoking functions of the mobile agent through the interface as indicated by the mobile agent. In one embodiment, the mobile agent may be formatted so that a host mobile agent handler may recognize the data and services that a mobile agent may provide. For example, a mobile agent may use HTML or XML tags to indicate data and provide information about its interface and the services the mobile agent may provide. In one embodiment, interactions between a host mobile agent handler and a mobile agent are performed according to a common peer-to-peer protocol. In one embodiment, the host peer may operate with the mobile agent through a peer-to-peer platform implemented on the host peer and providing peer-to-peer protocols compatible with the configuration of the mobile agent received.

[0133] In one embodiment, a mobile agent handler receiving a mobile agent may deny access to the received mobile agent, ensuring that the peer will not function as a host. For example, security reasons or incompatible configurations or parameters may prompt the receiving peer to not host the mobile agent received. The receiving mobile agent handler may instead relocate the mobile agent, for example as described above for FIG. 40. Relocation may be invisible to the mobile agent, as the receiving peer may change the mobile agent in such a way that the mobile agent may continue to operate after being relocated without disruption and/or may not otherwise interact with the mobile agent. For example, the receiving mobile agent handler may attempt to determine from the itinerary of the mobile agent some other peer to which the mobile agent might be sent. The receiving mobile agent handler may amend the mobile agent to configure it to expect to operate on the other peer. The receiving mobile agent handler may then launch the mobile agent to the other peer.

[0134] In one embodiment, the receiving mobile agent handler may return a mobile agent to its initiating peer or to the peer that sent the mobile agent to the receiving peer. In one embodiment, a receiving mobile agent handler may terminate or delete a mobile agent. If a receiving mobile agent handler terminates a mobile agent, the peer that created the mobile agent may be notified that its mobile agent was terminated. Deleting a mobile agent may be performed if a mobile agent handler that receives or hosts a mobile agent determines that the mobile agent may be a threat to its peer, network, other nodes, or other resources. For example, the mobile agent handler may detect that the mobile agent is infected with a virus or other code that may cause some unexpected or undesirable event. In one embodiment, a receiving mobile agent handler may attempt to correct or clean a mobile agent from its errors or viruses. In one embodiment, a mobile agent may include data or may be configured to provide data to a peer so that the peer may determine whether to host the mobile agent. For example, the mobile agent may include data certifying its authenticity, its integrity, and/or its origin. A host mobile agent handler may access one or more network resources to check the validity of such data or rely on keys, algorithms, encryption, or other security tools that may be implemented as part of its peer-to-peer platform.

[0135] The mobile agent may determine whether the peer hosting the mobile agent is the peer that initiated the mobile agent, as indicated at 1703. If the host peer is not the initiating peer, the mobile agent may perform one or more functions as indicated at 1704. For example, the mobile agent may provide some service on or gather data from the host peer. The mobile agent may interact with the host peer as part of performing its functions. In one embodiment, the mobile agent may use or access resources of the host peer such as data regarding the peer-to-peer network. The host peer may provide services for the mobile agent to access local data. For example, the host peer may provide functions for data search. Host services may be advertised according to peer-to-peer protocols and accessible by the mobile agent according to peer-to-peer protocols.

[0136] The mobile agent may update its internal data, as indicated at 1705, using information obtained from the host peer or from its operations on the host peer. In one embodiment, the mobile agent may access data on the host corresponding to peers, services, data, or other resources in the peer-to-peer network. The mobile agent may update its itinerary to indicate that it visited its current host, what operations where performed, and/or results obtained. In one embodiment, a mobile agent may wait until it reaches the next peer to update its itinerary to indicate that it visited the previous peer. After indicating that it visited a peer, a mobile agent's itinerary may ensure that the mobile agent does not visit that peer again.

[0137] In one embodiment, the mobile agent may be configured to amend its itinerary to include additional peers to visit. For example, a mobile agent may be launched to discover or test the status of peers in a peer-to-peer network with an itinerary including data for a number of peers known to the initiating peer. Upon reaching one of the peers on its itinerary, the mobile agent may access data indicating other peers in the network that were not included originally on its itinerary. In one embodiment, the mobile agent may amend its itinerary data to include these other peers. The mobile agent may be configured to look for information indicating previously unknown peers or other resources. The mobile agent may add to its itinerary some of the peers it discovers but not others, according to parameters established by its initiating peer in its configuration. For example, the mobile agent may have been created to discover certain types of peers for the initiating peer, such as peers that have certain data, provide certain services, have certain connections, or have some other property or combination of properties in the peer-to-peer network.

[0138] In one embodiment, a mobile agent may share its internal data with its host. A mobile agent may send some of its internal data to its host mobile agent handler, peer, programs, hardware, or other element of the host peer. A host may request data from a mobile agent according to a peer-to-peer protocol. In one embodiment, the host mobile agent handler may access data from the mobile agent it is hosting. The host may parse the mobile agent searching for tags, keywords, or other indicator according to a standard protocol that describe the data stored in mobile agent.

[0139] After completing its operations on its current host, a mobile agent may attempt to contact another peer to which it may relocate selected according to its itinerary, as indicated at 1706. The mobile agent may access its itinerary data to determine which peer it should next visit. The mobile agent may be configured to perform one or more attempts to establish a peer-to-peer connection, such as a pipe, to the next peer. In one embodiment, the mobile agent may access its host to determine if a communication channel between its host and next peer to visit already exists and may use that connection if possible. In one embodiment, the mobile agent may request a suitable connection to its next peer from its host peer using a protocol of the peer-to-peer platform implemented by its host.

[0140] Depending on whether contact can be established to the next peer the mobile agent is configured to visit, as indicated at 1707, the mobile agent may launch to the next peer and continue operating from there, as indicated at 1702, or may note that it could not contact that peer and select another next peer to visit, as indicated at 1705. The mobile agent may repeat 1701-1707 until the mobile agent reaches its initiating peer, as indicated at 1703. Upon reaching its initiating peer, the mobile agent may include payload data for the initiating peer. In one embodiment, the mobile agent may return payload data by transmitting the payload data from a host peer to the initiating peer. The mobile agent may be prompted to return its payload data by the expiration of a clock, a timer, or a host to peer, even if its host peer is not its initiating peer.

[0141] Peer Group Presence Detection

[0142] Embodiments of a mobile agent may be configured to travel in a peer group along an itinerary to determine the status of the peers in the peer group. For example, the mobile agent function may be configured to record as the mobile agent payload the list of peers successfully visited. The function may be configured to update the list at each peer it reaches. In one embodiment, a mobile agent may update its payload after determining that it may travel to another peer and before reaching that peer. In one embodiment, if a mobile agent cannot reach a peer indicated by its itinerary, the mobile agent may record this status or ignore that peer and then proceed to attempting to reach another peer on its itinerary.

[0143] In one embodiment, a mobile agent may be launched by an initiating peer in a peer group (e.g. at varying or periodic intervals) to attempt to visit each member peer in a peer group. The itinerary of the mobile agent may include information for accessing each member peer of the peer group (e.g. an advertisement for a mobile agent input pipe for each of the member peers). The mobile agent may return to its initiating peer with a payload indicating which of the member peers it was successful in contacting and visiting (or alternatively indicating which of the member peers it was unsuccessful in contacting and visiting).

[0144]FIG. 42 illustrates a member peer in a peer group using a mobile agent to detect peer group member presence according to one embodiment. In one embodiment, the peer group may be implemented in a peer-to-peer network implemented according to the exemplary peer-to-peer platform as described below. In this embodiment, each peer 200 in peer group 210 may advertise an input pipe for receiving incoming mobile agents, e.g. when a particular module (e.g. service, application, etc.) is active. In this example, peers 200A, 200B, and 200D are members of peer group 210, and peers 200C and 200E are not member peers. Peer 200A may, if desired, generate and launch a mobile agent 1400 to detect peer group member presence. The mobile agent may include an itinerary of advertised pipes for member peers. The mobile agent 1400 may travel to each member peer in its itinerary, and return to the originating peer 200A when done. The peer 200A may then access the mobile agent's payload to determine current peer group presence at the time of the mobile agent's visit(s). In one embodiment, mobile agents 1400 may be used by modules (e.g. services, applications, etc.) to detect peer group presence of other instances of the module in the peer group.

[0145] As an example, an information management (IM) application may create an input pipe with a name formatted according to:

[0146] <user handle>.agentDaemon.IMapp

[0147] For example:

[0148] UserName agentDaemon.IMapp

[0149] Note that the name format and example are exemplary and are not intended to be limiting. The name may then be advertised in a pipe advertisement along with a unique identifier (e.g. a URN or UUID as described below for the exemplary peer-to-peer platform).

[0150] If:

[0151] UserName(i), i=1 . . . n

[0152] were then in a given peer group, p, such as peer group 210 of FIG. 42, each such member may use the peer-to-peer platform pipe discovery protocol to find as many of these advertisements as possible, and may add to this list other usernames that the member may have acquired by other methods (e.g. received in other advertisements), thus giving each such peer group member a “buddy list” (note that the buddy list does not necessarily include all of the members of the peer group):

[0153] UserName(k), k=1 . . . m

[0154] Each member peer running the IM application may then, when desired, launch a mobile agent on the peer-to-peer network with the “buddy list” of pipe names as an itinerary, along with the associated daemon pipe name of the originating peer so that the mobile agent may return to the originating peer after attempting to visit the owner of each advertised pipe. In one embodiment, the mobile agent may be launched periodically.

[0155] In one embodiment, the mobile agent may include a “presence template” constructed at the originating member peer that may include one or more of, but is not limited to, the following elements:

[0156] Home—the originating peer's application daemon pipe name.

[0157] Unique identifier—Identifier used by the daemon as a launch identifier.

[0158] Time-to-live—Indicates how long to wait before abandoning a particular pipe on the itinerary.

[0159] To—The immediate destination peer's daemon pipe name.

[0160] Itinerary—The remaining list of daemon pipe names to visit.

[0161] Return payload—Application-dependent return data.

[0162] Class—A class (e.g. Java class) that may be executed on each peer.

[0163] Parameters—May be passed to a Class at execution time.

[0164] Signature—Used to guarantee a Class's integrity (e.g. a subset of an X509.V3 certificate).

[0165] For the presence mobile agent, the return payload may be a list of peers successfully visited. Mobile agents for other tasks may have other payloads.

[0166] When a presence mobile agent arrives at a peer on its itinerary, the peer may update the return payload, and then may attempt to contact a next peer on the itinerary. In one embodiment, the peer may acquire the pipe advertisement from the itinerary (or alternatively acquire the pipe advertisement from elsewhere using information in the itinerary). If the pipe advertisement is acquired, the peer may attempt to open the advertised pipe. If successfully opened, the peer may attempt to send a message with appropriately updated “To”, “Itinerary”, and “Return payload” fields to the input pipe specified by the advertisement. If the above is successful, the mobile agent arrives at the next itinerary hop. If failure occurs at any point, then the next “hop” on the itinerary may be selected and the above repeated until the mobile agent successfully reaches a “hop” on the itinerary or is returned to the originating peer if no “hops” are reached. When the mobile agent returns to the originating peer, the active “buddy list” may be made current using the payload of the mobile agent.

[0167]FIG. 43 is a flowchart illustrating detecting presence in a peer group using a mobile agent according to one embodiment. As indicated at 1790, an initiating peer node launches a mobile agent including an itinerary of a group of peer nodes to be visited. In one embodiment, the itinerary may be generated from presence information indicating member peer nodes that may be present in the group. The initiating peer node and the peer nodes indicated by the itinerary are member peer nodes in the group of peer nodes in a peer-to-peer network. To launch the mobile agent, the initiating peer node may send the mobile agent to a first peer node indicated by the itinerary. In one embodiment, the initiating peer node may determine a first peer node on the itinerary that is available to receive the mobile agent.

[0168] As indicated at 1792, the mobile agent collects indications of presence in the group of peer nodes indicated by the itinerary. To collect the indications of presence, the mobile agent may visit one or more of the plurality of peer nodes indicated by the itinerary. A peer node indicated by the itinerary and available to receive the mobile agent may receive the mobile agent from a previous peer node (either the initiating peer node or one of the peer nodes on the itinerary). In one embodiment, on a visited peer node, an indication that the peer node has been visited by the mobile agent may be stored in a payload of the mobile agent. The visited peer node may then send the mobile agent to a next peer node indicated by the itinerary. In one embodiment, the peer node may select a next peer node indicated by the itinerary as a target peer node. The peer node may determine if the target peer node is available to receive the mobile agent. If the target peer node is not available to receive the mobile agent, the peer node may select a subsequent (unvisited) peer node as the target peer node and determine if the target peer node is available to receive the mobile agent. In one embodiment, this process may continue until either a target peer node is found that is available to receive the mobile agent or until the itinerary is exhausted (i.e. there are no more unvisited peer nodes that are available to receive the mobile agent on the itinerary).

[0169] If a target peer node is found that is available to receive the mobile agent, the peer node may send the mobile agent to the target peer node. If the itinerary is exhausted before finding an available target peer node, the peer node may return the mobile agent to the initiating peer node. In one embodiment, the mobile agent may include contact information for returning the mobile agent to the initiating peer node. Thus, the mobile agent may continue visiting available peer nodes on the itinerary until the itinerary is completed. At each successfully visited peer node, an indication that the mobile agent has visited the peer node may be stored in the mobile agent to indicate the visited peer node is present in the peer group. When the mobile agent returns to the initiating peer node, the mobile agent provides the presence indications of the one or more visited peer nodes on the itinerary that were successfully visited to the initiating peer node

[0170] As indicated at 1794, the initiating peer node may then update the presence information indicating presence of member peer nodes in the group in accordance with the indications provided by the mobile agent. In one embodiment, the initiating peer node may indicate in the presence information that one or more of the plurality of peer nodes not visited by the mobile agent are not present in the group of peer nodes. In one embodiment, the initiating peer node may remove from the presence information indications that one or more of the plurality of peer nodes not visited by the mobile agent are present in the group of peer nodes.

[0171] In one embodiment, the initiating peer node may subsequently launch the mobile agent with an itinerary indicating member peer nodes indicated as present in the peer group as indicated by the updated presence information. In one embodiment, other member peer nodes may launch mobile agents with itineraries indicating other member peers in the peer group to update presence detection on the other member peer nodes. In one embodiment, the initiating peer node may provide the presence information to other member peer nodes in the group. In one embodiment, the initiating peer node may launch mobile agents including itineraries of member peer nodes in other groups of peers in which the initiating peer node is a member to update presence information for the other peer groups.

[0172] In one embodiment, the peer nodes in the peer-to-peer network may be configured to implement a peer-to-peer environment according to a peer-to-peer platform such as the exemplary peer-to-peer platform described below which includes one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, join peer groups, and send and receive mobile agents in the peer-to-peer environment. In one embodiment, pipes implemented according to the peer-to-peer platform may be used to send the mobile agent between peer nodes on the itinerary.

[0173] Collaborative Content Control

[0174] Version control may be a concern when performing collaborative content sharing in a peer-to-peer environment such as a peer-to-peer environment implemented according to the exemplary peer-to-peer platform described below. For example, if a peer group is formed to do collaborative content writing, and its members are sharing and editing one or more of these documents, a mechanism may be desired or required to guarantee that edits are applied to most recent version of these documents. Embodiments of the system and method for implementing mobile agents in the peer-to-peer environment may be configured to perform version control for collaborative content sharing among groups of peers in peer-to-peer networks.

[0175] In one embodiment, when a group of n peers is formed that may desire or require collaborative content sharing, each member peer in the group may generate a communications channel (e.g. input pipe as described for the exemplary peer-to-peer platform) to receive incoming mobile agents. Each mobile agent may have as an itinerary an identifier or other indicator for the communications channels (e.g. input pipes) of the other members of the peer group. In one embodiment, n may be variable, as peers may join and leave the group dynamically. In one embodiment implemented according to the exemplary peer-to-peer platform, the value of n may be determined by the peer-to-peer platform pipe discovery protocol.

[0176] Given the itinerary, one or more of the peer group members may launch mobile agents to resolve version conflicts of a given set of documents d(i), i=1 . . . k. In one embodiment, the document names may be included in a mobile agent. In one embodiment, the document names may be part of a mobile agent payload. In one embodiment, a mobile agent may also include a function to perform conflict resolution at each peer that it visits. In one embodiment, the function may be a Java class. In one embodiment, the Java class may be a certified Java class.

[0177] In one embodiment, the mobile agent may collect version information from each visited peer for each document and return to the initiating peer. Upon returning to the initiating peer, the mobile agent may include a list of visited peers and document versions on the visited peers. In one embodiment, the mobile agent may also include content size of the documents. In one embodiment, the documents may be ranked, for example from most recent to least recent versions.

[0178] In one embodiment, the mobile agent may return the actual document(s) with the highest (latest) version. Alternatively, a reference to the document(s) with the highest (latest) version may be returned. In one embodiment, a document reference may include an identifier (e.g. a URI, URN, or UUID) for the document and a communications channel (e.g. pipe) identifier for accessing the document. In one embodiment, the document identifier may be application-dependent. The initiating peer may then acquire a highest (latest) version of the document if desired. Returning a reference rather than the actual document may help decrease bandwidth usage, as a peer may acquire the document only if desired or necessary.

[0179] In one embodiment, documents may be write locked to permit member peers in the group of peers to become coherent before a collaborative editing session begins. In one embodiment, a mobile agent to perform version control for peer groups using collaborative context sharing may be launched before, during, and/or after an editing session as long as write locking is performed during the session. In one embodiment, mobile agents may be used to gather and return active document information including document names during an editing session. One embodiment may include a user interface for presenting gathered document information.

[0180] In one embodiment, visited peers may use the accumulated payload to determine if their version of the document(s) are up to date and, if not, may add a version update request to the payload. Upon receiving the final payload, the initiating peer may send the most recent version information to peers that added version update requests to the payload.

[0181]FIG. 44 is a flowchart illustrating collaborative content control in a peer group using a mobile agent according to one embodiment. As indicated at 1800, an initiating peer node may launch a mobile agent including an itinerary of a group of peer nodes to be visited and indications of one or more documents that the group of peer nodes are collaboratively editing in an editing session. In one embodiment, to launch a mobile agent, the initiating peer node may send the mobile agent to a first peer node indicated by the itinerary.

[0182] As indicated at 1802, the mobile agent may visit one or more of the subset of the plurality of peer nodes indicated by the itinerary to collect version information for the one or more documents on the one or more visited peer nodes. In one embodiment, the version information may include indications of versions for each of the one or more documents on the peer nodes indicated by the itinerary and indications of the corresponding peer nodes including the indicated versions. In one embodiment, the indications of versions and the corresponding indications of peer nodes may be stored in the mobile agent in one or more lists each sorted from a most recent to a least recent version of the corresponding document. In one embodiment, the version information may include size information for each version of each of the one or more documents. In another embodiment, the most recent version of each of the one or more documents may be included in the mobile agent. In one embodiment, the mobile agent may store the collected version information in a payload of the mobile agent. To provide the version information to the initiating peer node, the mobile agent may return to the initiating peer node with the payload after visiting the one or more of the subset of the plurality of peer nodes indicated by the itinerary.

[0183] In one embodiment, the version information may include a reference to the most recent version of each of the one or more documents. A reference may be used for accessing the corresponding document on the peer-to-peer network. In one embodiment, the reference may include a Uniform Resource Indicator (URI), such as the URIs described for the exemplary peer-to-peer platform described below, corresponding to the document. In one embodiment, the reference may include a communications channel identifier such as the pipe identifiers described for the exemplary peer-to-peer platform described below. In one embodiment, the reference may include an advertisement such as the pipe advertisements described for the exemplary peer-to-peer platform described below.

[0184] In one embodiment, each visited peer node may receive the mobile agent from a previous peer node. The version information for versions of the one or more documents on the peer node may be stored in a payload of the mobile agent. The peer node may then send the mobile agent to a next peer node. In one embodiment, to send the mobile agent to a next peer node, the peer node may determine if the mobile agent has completed the itinerary. If the mobile agent has not completed the itinerary, the peer node may send the mobile agent to a next peer node indicated by the itinerary. If the mobile agent has completed the itinerary, the peer node may return the mobile agent to the initiating peer node.

[0185] As indicated at 1804, after receiving the version information collected by the mobile agent, the initiating peer node may coordinate each of the one or more documents on the group of peer nodes to a most recent version in accordance with the version information provided by the mobile agent. In one embodiment, to coordinate each of the one or more documents, the initiating peer node may first lock the one or more documents to limit access to the documents during coordination. In one embodiment, to coordinate each of the one or more documents, the initiating peer node may provide the most recent version of each of the one or more documents to one or more other peer nodes in the group of peer nodes. In another embodiment, to coordinate each of the one or more documents, the initiating peer node may provide access information for obtaining the most recent version of each of the one or more documents to one or more other peer nodes in the group of peer nodes.

[0186] In one embodiment, the initiating peer node may coordinate each of the one or more documents on the group of peer nodes to the most recent version prior to, during, and/or after an editing session on the document. To coordinate the documents during an editing session, the documents may be locked to limit access to the documents during coordination.

[0187] In one embodiment, the peer nodes in the peer-to-peer network may be configured to implement a peer-to-peer environment according to a peer-to-peer platform such as the exemplary peer-to-peer platform described below which includes one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, join peer groups, share content including collaboratively edited documents, and send and receive mobile agents in the peer-to-peer environment. In one embodiment, pipes implemented according to the peer-to-peer platform may be used to send the mobile agent between peer nodes on the itinerary.

[0188]FIG. 45 illustrates a host peer operating in response to a mobile agent configured to perform version control according to one embodiment. The mobile agent may travel through the network according to its itinerary while collecting version information from peers concerning one or more documents stored or accessible by the peers. In one embodiment, the mobile agent may collect other information, such as file sizes, creation dates, peers that originated the documents, and other similar properties of data files. File information may be stored with each file. In one embodiment, a peer may store file information with each local file or may generate the information in response to a request from a mobile agent.

[0189] A peer may receive and determine whether to host a mobile agent, as indicated at 1810-11. The mobile agent hosted may then direct the peer node to obtain version information concerning one or more data files accessible by the peer node. In one embodiment, the peer node may search for accessible data files and select relevant data files, as indicated at 1812. The search for accessible data files may involve all files stored locally by the peer node or may be limited. For example, some local files may not be accessible or visible to the peer-to-peer environment for security purposes, or according to user configurations or other configuration. The mobile agent may include data indicating accessible data files of interest for selection. In one embodiment, the mobile agent may include one or more identifiers such as a file name, a handle, and/or other identifier. The peer node may then select matching data files found by the search according to the identifier(s). For example, the mobile agent may include data indicating interest in files with a particular name extension, such as “sxi”, “doc” or “txt.” The peer node may then select the files found that match criteria indicated by the mobile agent. In some circumstances, a peer node may not find any relevant data files, and may indicate this to the mobile agent.

[0190] To prevent modifications that would reduce the usefulness of information collected about selected data files, in one embodiment a peer node may write lock the selected data files, as indicated at 1813. A write lock may involve accessing a property setting of a data file, for example configuring a read/write data file as read only. Version information may then be gathered about the selected data files, as indicated at 1814. In one embodiment, a write lock is not performed. In this embodiment, as the file may be modified, the version information collected may not always be accurate. In one embodiment, a write lock may also be released and files changed after information is collected.

[0191] The version information collected may then be stored as part of the mobile agent payload, as indicated at 1815. In one embodiment, the version information may be stored with version information already stored in the payload. For example, the mobile agent payload may form a database and collected version information may be added to the database. The data may be ordered according to one or more of size, date, version or revision number, or other property or combination of properties. The information may include data enabling a peer to retrieve a data file from another peer.

[0192] In one embodiment, the payload may include actual data files. The peer node hosting the mobile agent may add data files to the payload and/or may replace files in the payload with files found locally. For example, the mobile agent may be configured to search for the latest version of a particular data file and the payload may include an older version of that file if found locally. The peer node may therefore replace the file in the payload with a copy of the local file with corresponding version information. In one embodiment, the mobile agent may prompt its host peer to send the version information or the actual files to its home peer node directly to reduce bandwidth use and/or to provide for failure management. As the data collected, whether files or version information, may be large, accumulating the data in the mobile agent may result in a significant consumption of resources in bandwidth and storage. Moreover, if the mobile agent fails or is otherwise terminated, the home peer may have received at least some data and may be able to determine which peer nodes the mobile agent visited. The home peer may then use a similar mobile agent with an itinerary configured to continue the work of the previous mobile agent. In another embodiment, a mobile agent may be configured to return to its home peer under certain conditions so that it may return results in smaller amounts, for example if and when the mobile agent reaches a size limit or visits a particular number of peer nodes.

[0193] The peer node may use the itinerary to determine a next peer to which the mobile agent is to be sent, and may send the mobile agent to that next peer, as indicated at 1817 and 1819. The home peer node of the mobile agent may receive the version information collected from one or more peers. The data may be analyzed to determine which peer stores the most up-to-date version of a data file and the home peer may then communicate with that peer to obtain a copy of the data file. In one embodiment, the home peer may notify one or more other peers of the peer storing the latest version, and the peer nodes may synchronize by updating corresponding data files to the latest version. In one embodiment, the home peer may send peers a copy of the latest version. A home peer node may use the results from the mobile agent for other purposes, such as cataloging files or finding backups and previous versions.

[0194] In one embodiment, peers storing files with the same or different versions with version control may form a peer group. The membership of the peer group may be changed, or another peer group may be formed, in response to the results from the mobile agent. Mobile agent itineraries may be limited to visit members of one or more peer groups to make operations more efficient.

[0195] Digital Rights Management

[0196] Peer-to-peer platforms such as the exemplary peer-to-peer platform described below may permit independent developers to write content distribution and/or sharing applications for copyright-sensitive data such as music and video. Embodiments of the system and method for implementing mobile agents in the peer-to-peer environment may be configured to provide digital rights management on peers in peer-to-peer networks. Embodiments may allow vendors or others to create and use vendor-certified mobile agents for performing digital rights management in peer-to-peer networks. These embodiments may, for example, help combat copyright theft to permit legal distribution and sharing of copyrighted material in peer-to-peer networks.

[0197] In one embodiment, a mobile agent may include or specify a function to be performed on visited peers. In one embodiment, the function may be an executable Java class. In one embodiment, the Java class may be a certified (signed) Java class. Using certified Java classes may help prevent fraudulent mobile agents from masquerading as vendor-certified digital rights management mobile agents.

[0198] In one embodiment, a distributor of copyright-sensitive content for sale may distribute this content to a subscriber peer group (e.g. a peer group implemented according to the exemplary peer-to-peer platform described below) running a content sharing network module (e.g. application, service, etc.), for example, a module as described for the exemplary peer-to-peer platform. In one embodiment, each member of the peer group that runs this module may include a mobile agent listening service, and may advertise the mobile agent listening service. In one embodiment, the mobile agent listening service may be advertised with a communications channel (e.g. pipe) advertisement such as a pipe advertisement of the exemplary peer-to-peer platform described below. The distributor may discover or be informed of all such advertised mobile agent listening services. In one embodiment, the distributor may be made aware of all such advertisements via a discovery protocol such as the discovery protocol described for the exemplary peer-to-peer platform.

[0199] Given a set of n subscribers, each of which may be capable of sharing purchased copyright material among other subscribers in the set, a content distributor may launch digital rights management mobile agents with one or more of the n subscribers on their itineraries. In one embodiment, the itineraries may include communications channel (e.g. pipe) identifiers or other information for identifying and communicating the subscriber peers on the itineraries. These digital rights management mobile agents may visit as many subscriber peers on their itineraries as possible (e.g. those peers that are available when the mobile agent attempts to visit). The function included in or specified by the mobile agent may examine each visited peer's system, searching for copyrighted material that the peer has either purchased or acquired from another peer. The mobile agent may return to the content distributor with this information for analysis after completing its itinerary traversal. Digital rights management mobile agents may be used by the content distributor in detecting and minimizing theft of copyrighted material in the peer-to-peer supported marketplace.

[0200] In one embodiment, when a content distribution module (e.g. application, service, etc.) is downloaded by a peer, the module may include one or more of a root certificate of the content distributor, a root certificate of an affiliate of the content distributor, and/or a root certificate of a certificate authority that has signed either the distributor's or an affiliate's service certificate. The content distribution module may then be able to verify the signature of a payload of certified digital rights management mobile agents when such a mobile agent visits the peer. If the root certificate was created by the distributor or its affiliate, in one embodiment the certificate may include the public key of the public/private key pair associated with the certificate and an algorithm used for signing the payload (e.g. SHA-1 with RSA). If the certificate is a certificate authority root certificate, the service certificate may arrive as part of the digital rights management mobile agent's payload, and may be signed by the certificate authority. The service certificate may include the appropriate public key used to verify the signature of the payload.

[0201] Upon arrival at a peer, a digital rights management mobile agent may be verified as certified by validating its signature. If certified, the digital rights management mobile agent may be permitted to run the function it includes or indicates to search for copyrighted material of the distributor associated with the digital rights management mobile agent on the peer.

[0202]FIG. 46 is a flowchart illustrating using a mobile agent to detect unauthorized copies of content according to one embodiment. As indicated at 1820, an initiating peer node may launch a mobile agent including an itinerary of a group of peer nodes configured to receive and share content from a distributor. In one embodiment, to launch a mobile agent, the initiating peer node may send the mobile agent to a first peer node indicated by the itinerary.

[0203] As indicated at 1822, the mobile agent may visit one or more of the subset of the plurality of peer nodes indicated by the itinerary to collect information on distributor content stored on the visited peer nodes. In one embodiment, to collect information on distributor content stored on the one or more visited peer nodes, the mobile agent may search content on each visited peer node to locate distributor content on the peer node. In one embodiment, the information on distributor content located on the visited peer node may be stored in a payload of the mobile agent. In one embodiment, to provide the information on the distributor content to the initiating peer node, the mobile agent may return the payload to the initiating peer node after visiting the one or more of the subset of the plurality of peer nodes indicated by the itinerary.

[0204] In one embodiment, each visited peer node may receive the mobile agent from a previous peer node. Information on distributor content stored on the peer node may be stored in a payload of the mobile agent. The peer node may then send the mobile agent to a next peer node. In one embodiment, to send the mobile agent to a next peer node, the peer node may determine if the mobile agent has completed the itinerary. If the mobile agent has not completed the itinerary, the peer node may send the mobile agent to a next peer node indicated by the itinerary. If the mobile agent has completed the itinerary, the peer node may return the mobile agent to the initiating peer node.

[0205] In one embodiment, the mobile agent may include authentication information. Each visited peer node may access the authentication information to verify the mobile agent as authorized by the distributor to collect information on distributor content stored on the peer node. In one embodiment, the authentication information may include a signed certificate.

[0206] As indicated at 1824, the initiating peer node may examine the information on the distributor content provided by the mobile agent to detect unauthorized copies of the distributor content. Embodiments of a mobile agent may be used in different environments to detect unauthorized copies of different types of digital content that the user (i.e. distributor or agent of the distributor) desires to control the distribution of. For example, a distributor may use one embodiment of a mobile agent to detect unauthorized copies of copyrighted content. Copyrighted content may include digital audio, video, image, text, multimedia, or any other digital, copyrightable material, or a combination thereof. Embodiments of a mobile agent may be used to detect unauthorized content other than copyrighted material. For example, a mobile agent may be used by an distributed (e.g. enterprise or individual) to detect unauthorized copies of sensitive, private, secure, and/or any other type of content that the enterprise desires to control the distribution of. An enterprise may be any public or private institution or organization, including, but not limited to, businesses, corporations, public and private schools, governments and government agencies, non-profit organizations, etc.

[0207] In one embodiment, the peer nodes in the peer-to-peer network may be configured to implement a peer-to-peer environment according to a peer-to-peer platform such as the exemplary peer-to-peer platform described below which includes one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, join peer groups, share content including distributor content, and send and receive mobile agents in the peer-to-peer environment. In one embodiment, pipes implemented according to the peer-to-peer platform may be used to send the mobile agent between peer nodes on the itinerary.

[0208]FIG. 47 illustrates a host peer operating in response to a digital rights management mobile agent according to one embodiment. The mobile agent may travel through the network according to its itinerary to search for copyrighted or other distributor material on one or more peers. In one embodiment, the mobile agent may collect other information, such as file property information (size, owner, etc). Copyright status and other information may be stored with each file. For example, a bit may be set in a file to indicate it is copyrighted material, or some other mechanism may be used, such as watermarks.

[0209] A peer may receive and determine whether to host a mobile agent, as indicated at 1830 and 1831. A peer may condition its hosting a digital rights management mobile agent upon a valid identification certificate to reduce the risk of breaching security or privacy by fraudulent mobile agents. A peer-to-peer platform enabling its peer node to participate in the peer-to-peer network may enable mobile agents to operate on the peer with varying levels of access depending on their credentials. A peer-to-peer platform may enable a mobile agent to search through its host system upon detecting a valid certificate. For example, the peer-to-peer platform may include content distribution applications with root certificates for the content distributor, one of its affiliates, or the root certificate of a certificate authority. The certificate authority may have signed the distributor or affiliate's certificate. The content distribution application may then be able to verify the signature of the mobile agent received and thereby confirm that a mobile agent is properly certified. One or more of various algorithms (e.g. Secure Hash Algorithm-1 (SHA-1) with RSA) may be used for signing mobile agents.

[0210] The mobile agent may also have its itinerary generated from a list of members of a peer group, a peer-to-peer network, or some other group of peer nodes. For example, the home peer node of the mobile agent may be a distributor of copyright material with a subscription list indicating peer nodes to which copyrighted material has been distributed. The itinerary may be formed from this or similar subscription lists, as well as client or user lists. Peers configured to exchange or receive copyrighted material may form peer groups and itineraries may be generated to reflect the membership of one or more of such peer groups. In one embodiment, nodes participating in these peer groups may implement a peer-to-peer platform that is configured to handle digital rights management mobile agents.

[0211] The mobile agent may then direct the peer node to search for and collect information about copyrighted material stored on the peer, as indicated at 1832. In one embodiment, the mobile agent may specify types of data files, and the peer may select from the copyrighted files found those files that also match the criteria specified by the mobile agent, as indicated at 1833. For example, a mobile agent may be configured to collect data regarding copyrighted files in an MP3 or movie format to limit the amount of data. The data collected may be stored as part of the mobile agent payload, as indicated at 1834. In one embodiment, the data may be stored with data already stored in the payload. For example, the mobile agent payload may include a database, and the new data may be added to the database. In one embodiment, data in the database may be encrypted or otherwise secured to reduce the risk of breaches of security or privacy. In other embodiments, data from local peers may be encrypted or secured to reduce the possibility of third parties accessing that data from the mobile agent during transmission or at other nodes. The data may be ordered according to one or more properties of the copyrighted files, such as by alphabetical order, date, or other property or combination of properties. The data may include data enabling the home peer node of the mobile agent to determine a file involved and the peer storing the file.

[0212] In one embodiment, the mobile agent may prompt its host peer to send the data to its home peer node directly to reduce bandwidth use and/or provide for failure management. The data transmitted may be encrypted or otherwise secured to reduce the risk of breaches of security and/or privacy. As the data collected may be large, accumulating it in the mobile agent may result in a significant consumption of resources in bandwidth and storage. Moreover, if the mobile agent fails or is otherwise terminated, the home peer may have received at least some data and may be able to determine which peer nodes the mobile agent visited. The home peer may then use a similar mobile agent with an itinerary configured to continue the work of the previous mobile agent. In another embodiment, a mobile agent may be configured to return to its home peer under certain conditions so that it may return results in smaller amounts, for example if and when the mobile agent reaches a size limit or visits a particular number of peer nodes.

[0213] The peer node may use the itinerary to determine a next peer to which the mobile agent is to be sent, and may send the mobile agent to that next peer, as indicated at 1836 and 1838. The home peer node of the mobile agent may receive the data collected from one or more of the peers indicated by the itinerary. In one embodiment, the home peer node may analyze the data gathered by the mobile agent to determine the status of the files found on the peer nodes the mobile agent visited. A home peer node may use the results from the mobile agent for other purposes, such as cataloguing files.

[0214] Evaluating Trust Using Mobile Agents

[0215] Embodiments of the system and method for implementing mobile agents in the peer-to-peer environment may be configured to gather reputation information for peers in peer-to-peer networks, for example reputation for content indexing. In these embodiments, a peer may evaluate other peers' reputations as providers of codats based on recommendations (trust evaluations) gathered by a mobile agent from a peer group for which content/keyword match is applicable. A keyword may indicate an area of interest of the peer, and the peer may be a member in a peer group with other peers that share the area of interest. Reputation information may be used in calculating trust in peers in the peer group as providers of codats relevant to the area of interest. Reputation information may also be referred to as trust information or trust evaluations. Mobile agents may be used in disseminating, calculating, and/or updating trust in peer-to-peer networks. In one embodiment, peers in the peer-to-peer network may use a trust mechanism such as the exemplary decentralized, distributed trust mechanism described below to calculate and/or evaluate trust in other peers using reputation information gathered by mobile agents.

[0216] In one embodiment, communications channels (e.g. pipes as described for the exemplary peer-to-peer platform described below) may be used to gather content/keyword evaluations and to establish groups or sub-groups of peers for each keyword in which the initiating peer(s) indicate interest. In one embodiment, a collection of groups or sub-groups of peers may determine a topological minimum for further mobile agent queries to limit the effect of such queries on network bandwidth and overall search performance.

[0217] In one embodiment, a mobile agent's itinerary may initially be an entire peer group. The mobile agent may be launched by an initiating peer (e.g. sent to a first peer on the itinerary). In one embodiment, the mobile agent may include or specify a function to be performed on visited peers. In one embodiment, the function may be an executable Java class. In one embodiment, the Java class may be a certified (signed) Java class. In one embodiment, the function may be configured to accumulate a return payload from visited peers based upon content/keyword matches on the visited peers as determined by each visited peer's local trust information.

[0218] In one embodiment, to preferably minimize network bandwidth impact, the mobile agent may return to its initiating peer when it has collected a predetermined amount of payload. If a mobile agent returns to its initiating peer after collecting a predetermined amount of payload and before all peers on the itinerary have been visited, the mobile agent may include a truncated itinerary including those peers it has not yet visited. The payload may be emptied and the mobile agent may continue its peer group traversal using the truncated itinerary until the predetermined amount of payload has been collected from the visited peers on the truncated payload. This may continue until the itinerary has been completed or, in one embodiment, until peers on the itinerary which the mobile agent cannot contact to visit do not respond for a predetermined time-to-live metric for the mobile agent to search for and collect trust information for peers in the peer group. For example, the time-to-live may be set to 30 minutes.

[0219] In one embodiment, as the mobile agent traverses the peer group, each peer on the itinerary that the mobile agent is to visit has a “time to live.” If the time to live expires for a peer before it is successfully visited, no further attempts to visit the peer will be made by the mobile agent. Peers that are not successfully visited within the “time to live” may have their reputation downgraded for having too high a risk for further interest. Once the peer group has been traversed by the mobile agent, those peers whose reputation is high enough may form a cooperative sub-group of peers for the next traversal by a mobile agent from an initiating peer. The collection of such sub-groups may be used as the basis for peers' content access.

[0220]FIG. 48 is a flowchart illustrating a peer node using a mobile agent to collect trust evaluations from a plurality of peer nodes according to one embodiment. As indicated at 1840, an initiating peer node in a peer-to-peer network may launch a mobile agent on the peer-to-peer network. The mobile agent may include an itinerary indicating a plurality of peer nodes in the peer-to-peer network to be visited by the mobile agent, and may include an indication of an area of interest of the initiating peer node. As indicated at 1842, the mobile agent may collect trust evaluations for a subset of the plurality of peer nodes as providers of codats relevant to the area of interest from one or more of the plurality of peer nodes indicated by the itinerary. In one embodiment, a codat is computer-representable content or data.

[0221] In one embodiment, the mobile agent may visit each of the plurality of peer nodes indicated by the itinerary to collect the trust evaluations. At each visited peer node, the mobile agent may determine if the visited peer node stores one or more trust evaluations for one or more of the plurality of peer nodes as providers of codats relevant to the area of interest. If the visited peer node stores one or more of the trust evaluations, the trust evaluations may be stored as payload data in the mobile agent. After completing the itinerary, the mobile agent may return the payload to the initiating peer node.

[0222] In one embodiment, if the stored payload data has reached a size limit, the mobile agent may return to the initiating peer node where the payload data may be removed from the mobile agent and stored on the initiating peer node. If there are more peer nodes on the itinerary that have yet to be visited, the initiating peer node may send the mobile agent to a next peer node on the itinerary. If the stored payload data has not reached a size limit and there are more peer nodes on the itinerary to be visited, the mobile agent may be sent to the next peer node on the itinerary. If there are no more peer nodes on the itinerary, the mobile agent may be returned to the initiating peer node.

[0223] In one embodiment, if the mobile agent is unable to visit one of the peer nodes indicated by the itinerary (for example, if the peer node is unavailable to be contacted by a peer node on the itinerary to receive the mobile agent), the initiating peer node may reduce a trust evaluation for the peer node that the mobile agent was not able to visit as a provider of codats relevant to the area of interest, as the peer node is considered unreliable. In one embodiment, the mobile agent may try one or more times to reach the peer node before “giving up” on the peer node. In one embodiment, the mobile agent may retry reaching the peer node until a time limit has expired.

[0224] As indicated at 1844, after receiving the trust evaluations collected by the mobile agent, the initiating peer node may determine a trust evaluation for each of the subset of the plurality of peer nodes as providers of codats relevant to the area of interest from the trust evaluations collected by the mobile agent. In one embodiment, the initiating peer node determines a trust evaluation for each of the subset of the plurality of peer nodes as a provider of codats relevant to the area of interest from the trust evaluations collected by the mobile agent and previous trust evaluations of the subset of the plurality of peer nodes as providers of codats relevant to the area of interest stored on the initiating peer node. In one embodiment, the initiating peer node may then select one or more of the subset of peer nodes for which corresponding trust evaluations are above a cooperation threshold as providers of codats relevant to the area of interest. In one embodiment, the initiating peer node and the selected one or more of the subset of peer nodes may form a peer group or sub-network for sharing codats relevant to the area of interest. Mobile agents subsequently launched by the initiating peer node may include the member peer nodes of this peer group or sub-network in their itinerary.

[0225] In one embodiment, the peer nodes in the peer-to-peer network may be configured to implement a distributed trust mechanism such as the exemplary distributed trust mechanism described below for establishing and maintaining trust relationships among the peer nodes in areas of interest from trust evaluations of codat exchange among the peer nodes in the area of interest. In this embodiment, determining a trust evaluation for each of the subset of the plurality of peer nodes as a provider of codats relevant to the area of interest from the trust evaluations collected by the mobile agent may be performed in accordance with the distributed trust mechanism.

[0226] In one embodiment, the peer nodes in the peer-to-peer network may be configured to implement a peer-to-peer environment according to a peer-to-peer platform such as the exemplary peer-to-peer platform described below which includes one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, find and exchange codats, and send and receive mobile agents in the peer-to-peer environment. In one embodiment, pipes implemented according to the peer-to-peer platform may be used to send the mobile agent between peer nodes on the itinerary.

[0227]FIG. 49 illustrates a host peer operating in response to a mobile agent configured to gather reputation information according to one embodiment. The mobile agent may travel through the network according to its itinerary while collecting data from peers. The mobile agent may also have its itinerary generated from a list of members of a peer group, a peer-to-peer network, or some other group of peer nodes indicating they are configured to provide or store reputation information. Peer groups may be formed according to areas of interest, so to remain in a peer group peers may maintain a high reputation or level of trust. Peers may store local trust information including local content/keyword data, as indicated at 1850, corresponding to one or more areas of interest. For example, a peer may store information about particular subjects, such as wine, travel, etc, and may maintain store reputation corresponding to those areas of interest. In one embodiment, peers participating in peer groups for reputation information may use a peer-to-peer platform configured to maintain or provide reputation information for mobile agents such as the exemplary peer-to-peer platform described below.

[0228] A peer may receive and determine whether to host a mobile agent, as indicated at 1851-52, for example as described for FIG. 41. The hosted mobile agent may then direct the peer node to gather reputation information. In one embodiment, the peer node may search local trust information and local content/keyword data, as indicated at 1853. The peer node may then collect the information for the mobile agent, as indicated at 1854. In one embodiment, the mobile agent may specify other criteria, for example identifying one or more areas of interest or refining the search within an area of interest, so that the peer node may discriminate when collecting data. In one embodiment, a search may be performed that is tailored to perform the discrimination and return appropriate results matching criteria indicated by the mobile agent. The peer may then store the information collected as part of the mobile agent payload, as indicated at 1855. In one embodiment, data may be formatted to be stored with other data already stored in the payload. For example, the mobile agent payload may form a database, and collected search information may be added to maintain the structure of the database. The data may also be formatted according to particular configurations, for example as codats. The term “codat” as used herein refers to any computer content—code, data, applications, or other collection of computer representable resources.

[0229] In one embodiment, the mobile agent may prompt its host peer to send the search information or the actual files to its home peer node directly to reduce bandwidth use and/or provide for failure management. As data collected may be large, accumulating it in the mobile agent may result in a significant consumption of resources in bandwidth and storage. Moreover, if the mobile agent fails or is otherwise terminated, the home peer may have received at least some data and may be able to determine which peer nodes the mobile agent visited. The home peer may then use a similar mobile agent with an itinerary configured to continue the work of the previous mobile agent. In another embodiment, a mobile agent may be configured to return to its home peer periodically so that it may return results in smaller amounts, for example each time the mobile agent reaches a size limit or visits a number of peer nodes. In one embodiment, a size limit of four kilobytes of payload may be appropriate for most bandwidth.

[0230] The peer node may use the itinerary to determine a next peer to which to send the mobile agent and send the mobile agent to that next peer, as indicated at 1856-58, for example as described for FIG. 41. The home peer node of the mobile agent may receive the version information collected from one or more peers. The data may be analyzed to determine which the overall reputation of the peers. In one embodiment, the home peer may notify its peers of results. The peer group membership may change according to the results to include peers with higher levels of reputation or trust. In one embodiment, new peer groups may be formed according to the results. The home peer node may initiate the peer group operations.

[0231] Distributed Trust Mechanism

[0232] Embodiments of a decentralized, distributed trust mechanism are described that may be used in various networking platforms, including, but not limited to, peer-to-peer and other decentralized networking platforms. The mechanism may be used, among other things, to implement trust relationships between and among peers and to implement trust relationships between peers and content and data (codat). Protocols and methods may be provided for disseminating and updating trust. For participating peers, trust may be biased towards data relevance, e.g. the quality of recipes in a cooking peer group in some embodiments. Trust may have multiple components or factors, and embodiments of the decentralized trust mechanism may provide for the inclusion of factors of trust based on a peer group's interests and/or group content relevance.

[0233] The term “codat” as used herein refers to any computer content—code, data (static and dynamic), documents, applications, certificates, or any other collection of computer-representable resources. Examples of codat may include, but are not limited to: text files, photographs, applets, executable files, serialized Java objects, SOAP messages, certificates, etc. Codat may also include abstractions, for example, routes or paths in a network.

[0234] Embodiments of this decentralized trust mechanism may be used for a variety of applications. One exemplary application of this trust mechanism may be to perform reputation-guided searching. Another exemplary application of the trust mechanism may be to build a recommendation system for security purposes. In general, embodiments may be used for applications in which trust may be based on the norm for social interaction between participating peers.

[0235]FIG. 50A illustrates trust relationships between peers and between peers and codat according to one embodiment. The trust mechanism may include a codat trust component that may be used in collecting information associated with a group's interests. In order to evaluate trust with respect to a peer 200B's interests, the peer's interests may be represented as one or more keywords 406. A user (i.e. of the peer 200B) may evaluate trust in a codat 500 to build a trust relationship for peer 200B with that codat. In one embodiment, the peer 200B may receive codat 500 from another peer 200A and may evaluate trust with respect to the peer's interest in the received codat 500. This evaluation may be made, for example, using search results (e.g. relevance) and user evaluation (e.g. user rating of the codat 500 using a GUI), and may generate or update codat confidence 408 in the received codat 500. In one embodiment, peer confidence 410 in the providing peer may be used in determining codat confidence 408. In one embodiment, the codat 500 may be received from a providing peer over a path of one or more other peers 200, and peer confidences 410 in the one or more providing peers may be used in determining codat confidence 408.

[0236] The results of the interest evaluation on the codat received from peer 200A, codat confidence 408, may then be used to evaluate peer 200B's trust in peer 200A (trust is a function of peer confidence 410 and possibly one or more other factors) as a source for codat 500 corresponding to one or more keywords 406 which represent areas of interests 506 of the peer 200B. Thus, evaluations of trust on a peer (for codat, paths, other peers, etc.) may be based on content and relative to areas of interest. From a user's perspective, rating codat 500 may be generally easier than rating a peer 200. Note that peer 200A may perform a similar trust evaluation of peer 200B.

[0237] The codat trust component is based on content, and differs from the traditional trust concept based on risk, which may be identified as the risk trust component. The risk trust component's value may be determined by one or more factors including, but not limited to: codat integrity (e.g., the codat contained a virus as noted by a virus pre-processor), peer accessibility (is the peer up most of the time), and peer performance (long delays in retrieving data).

[0238] On a network comprising a plurality of peer nodes, each peer may build a trust relationship with one or more of the other peers to form a “web of trust” as illustrated in FIG. 50B according to one embodiment. Each peer 200 may belong to one or more peer groups 210. Each peer group 210 may be formed or joined based upon a particular area of interest, which may be represented by a particular keyword. In one embodiment, a peer group 210 may be associated with two or more areas of interests, and thus keywords. In one embodiment, two or more peer groups may be associated with the same area of interest, and thus keyword. Peers 200 may exchange codat relevant to an area of interest within a peer group (or, in one embodiment, with peers 200 outside the peer group), determine codat confidence in the codat, and determine peer confidences relative to the area of interest for the providing peers using the codat confidences in codat relevant to the area of interest received from the peers 200. Trust relationships between peers 200 thus may be based on content (the codat trust component) instead of or in combination with the risk trust component. Peers 200 may also propagate codat confidence and peer confidence information to other peers 200.

[0239] In one embodiment, a peer, for example peer 200D, may receive codat from another peer, for example peer 200C, via one or more intermediary peers 200. In this example, there are two paths between peer 200C and peer 200D, one through peers 200A and 200B, and one through 200B. In one embodiment, a codat confidence may be determined using confidence information for the path, which may include peer confidences 410 in peers on the path.

[0240] In general, peers 200 are not necessarily members of all peer groups 210, and new peers 200 may not initially belong to any peer group 210. In one embodiment, since peer group membership may be motivated by keyword/interest, peers 200 that are not members of a particular peer group 210 may be allowed to retrieve peer confidence information from the peer group 210 to use as initial peer confidence information for the peer group 210. In one embodiment, peers 200 that are not members of a particular peer group 210 may also be allowed to retrieve codat confidence information from the peer group 210.

[0241]FIG. 51 illustrates a typical computer system that is suitable for implementing various embodiments of the decentralized trust mechanism on peers or other systems as described herein. Each computer system 180 typically includes components such as a processor 182 with an associated computer-accessible memory medium 184. Processor 182 may include one or more processors, such as a Sparc, X86 (Pentium), PowerPC, or Alpha processor. Computer-accessible memory medium 184 may store program instructions for computer programs, wherein the program instructions are executable by processor 182. The computer system 180 may further include a display device such as a monitor, an alphanumeric input device such as a keyboard, and a directional input device such as a mouse. Computer system 180 is operable to execute the computer programs to implement the decentralized trust mechanism as described herein.

[0242] The computer system 180 may further include hardware and program instructions for coupling to a network 106. The network 106 may be any of a variety of networks including, but not limited to, the Internet, corporate intranets, dynamic proximity networks, home networking environments, LANs and WANs, among others, and may include wired and/or wireless connections. The network 106 may implement any of a variety of transport protocols or combinations thereof, including, but not limited to, TCP/IP, HTTP, Bluetooth, HomePNA, and other protocols.

[0243] Computer system 180 typically includes a computer-accessible memory medium 184 on which computer programs according to various embodiments may be stored. The term “computer-accessible memory medium,” which may be referred to herein as “memory,” may include an installation medium, e.g., a CD-ROM, DVD or floppy disks, a computer system memory such as DRAM, SRAM, EDO DRAM, SDRAM, DDR SDRAM, Rambus RAM, etc., or a non-volatile memory such as a magnetic media, e.g., a hard drive, or optical storage, or a combination thereof. The memory 184 may include other types of memory as well, or combinations thereof. In addition, the memory 184 may be located in a first computer in which the programs are executed, or may be located in a second different computer that connects to the first computer over a network. In the latter instance, the second computer provides the program instructions to the first computer for execution. The instructions and/or data according to various embodiments may also be transferred upon a carrier medium. In some embodiments, a computer readable medium may be a carrier medium such as network 106 and/or a wireless link upon which signals such as electrical, electromagnetic, or digital signals may be conveyed.

[0244] In addition, computer system 180 may take various forms, including a personal computer system, server, workstation, cell phone, pager, laptop or notebook computer, smart appliance, network appliance, Internet appliance, personal digital assistant (PDA), set-top box, television system, mainframe computer system, and even supercomputer or other device. In general, the term “computer system” can be broadly defined to encompass any device having a processor that executes instructions from a computer-accessible memory medium.

[0245] In one embodiment, the memory 184 may store software programs and/or data for implementing a decentralized trust mechanism as described herein. In one embodiment, the memory 184 may further store software programs and/or data for implementing a peer 200 for participating in a peer-to-peer environment with other peers 200 (implemented on other computer systems 180) on network 106. The software program(s) may be implemented in any of various ways, including procedure-based techniques, component-based techniques, and/or object-oriented techniques, among others. For example, the software program may be implemented using ActiveX controls, C++ objects, JavaBeans, Microsoft Foundation Classes (MFC), or other technologies or methodologies, as desired. A CPU, such as the host processor 182, executing code and data from the memory medium 184 includes a means for creating and executing the software program or programs according to the methods and/or block diagrams described herein.

[0246] An exemplary peer-to-peer platform for enabling computer systems 180 to participate as a peer 200 in a peer-to-peer environment, and in or with which embodiments of the decentralized trust mechanism may be implemented, is described later in this document. It is noted that embodiments may also be implemented in other peer-to-peer environments implemented in accordance with other peer-to-peer mechanisms. It is further noted that, although embodiments as described herein are generally described in reference to peers and peer-to-peer networking environments, embodiments may also be implemented on other systems and in other architectures including other networking architectures and environments, for example client-server systems.

[0247] In one embodiment, the memory 184 may store one or more codat 500. Peer 200A may participate in the peer-to-peer environment with one or more groups of peers 200. The peer 200A may have one or more areas of interests 506 and may choose to participate in particular peer groups concerned with particular areas of interest 506. Codat 500 may be classified according to areas of interest 506. In one embodiment, a particular codat 500 may be classified in more than one area of interest 506. Memory 184 may also store one or more keywords 406 each associated with a particular area of interest 506. Memory 184 may also store one or more codat confidences 408 and one or more peer confidences 410. Each codat confidence 408 may represent the peer 200A's trust or confidence in a particular codat 500. Memory 184 may also store one or more peer confidences 410. Each peer confidence 410 may represent the peer 200A's trust in a particular peer 200. In one embodiment, trust mechanism 510 may be executable to determine or adjust a peer confidence 410 associated with a particular peer 200 using one or more codat confidences 408 associated with codat 500 received from the particular peer. Embodiments of methods for calculating codat confidence 408 and peer confidence 410 are described later in this document. While trust mechanism is illustrated as being a component or module integrated in peer 200, in some embodiments trust mechanism 510 may be a stand-alone module or program external to peer 200.

[0248] In one embodiment, the computer programs executable by the computer system 180 may be implemented in an object-oriented programming language. In an object-oriented programming language, data and related methods can be grouped together or encapsulated to form an entity known as an object. All objects in an object-oriented programming system belong to a class, which can be thought of as a category of like objects that describes the characteristics of those objects. Each object is created as an instance of the class by a program. The objects may therefore be said to have been instantiated from the class. The class sets out variables and methods for objects that belong to that class. The definition of the class does not itself create any objects. The class may define initial values for its variables, and it normally defines the methods associated with the class (i.e., includes the program code which is executed when a method is invoked.) The class may thereby provide all of the program code that will be used by objects in the class, hence maximizing re-use of code that is shared by objects in the class.

[0249] In one embodiment, an API may be provided for developing graphical user interfaces (GUIs) for codat user rating. Implicitly, a user may be able to perceive how well retrieved codat fits the search criteria. This goes beyond simple keyword match, and rating information may be provided by user input to the GUI, and may in one embodiment serve as a user-supplied factor of the codat confidence relevance metric.

[0250]FIG. 52 illustrates an exemplary architecture of a peer 200 (which also may be referred to as a peer node of a network) implementing a trust mechanism according to one embodiment. In one embodiment, a peer 200 may include a trust mechanism 510 which may include one or more codat confidence tables 400 which each may include one or more codat confidences, and one or more peer confidence tables 402 which each may include one or more peer confidences. In one embodiment, there may be one peer confidence table 402 for each peer group of which peer 200 is a member. In one embodiment, peer 200 may include a peer group independent peer confidence table 404 which may include one or more peer confidences corresponding to the peers in the peer groups in which peer 200 is a member peer.

[0251] Peer 200 may include codat 500. Codat 500 may be classified by area of interest 506 of peer 200. Each area of interest 506 may correspond to a particular keyword 406. Peer 200 may determine confidence in codat 500 and record the codat confidences in codat confidence table 400. Codat confidences for codat received from another peer in a particular area of interest represented by a keyword 406 may be used to determine or adjust peer 200's peer confidence in the other peer. The peer confidence may be recorded or updated in the peer confidence table 402 corresponding to the peer group in which both peer 200 and the other peer are member peers. The peer confidence may also be recorded or updated in the peer group independent peer confidence table 404.

[0252] In one embodiment, peer trust may be a function of peer confidence and risk. In one embodiment, peer 200 may also include one or more peer risk tables 412 which each may include one or more peer risks each associated with a particular peer. Peer risk for a particular peer may be determined using one or more factors including, but not limited to, codat integrity (e.g., did codat received from the peer contain a virus as noted by a virus pre-processor), peer accessibility (is the peer up most of the time?), and peer performance (e.g. are there long delays in retrieving data from the peer?). Entries in peer risk tables 412 may be used in evaluating a peer's risk trust component. In one embodiment, the peer confidence and risk tables may be used in determining if a target peer is able to cooperate and is thus trustworthy.

[0253]FIG. 53A illustrates a codat confidence table 400 according to one embodiment. For each keyword 406 representing an interest of the peer, there may be one or more codat confidences 408 each corresponding to a codat 500 classified under the particular interest 506 represented by the keyword 406. Each codat confidence 408 may indicate a confidence value of the peer 200 in the corresponding codat 500. In one embodiment, codat confidence tables 400 may be used in determining and/or adjusting peer confidences 410. In one embodiment, codat confidence tables 400 may be searched by keyword 406 when searching for codat 500.

[0254] In one embodiment, codat 500 may be associated with peer groups, and a peer 200 may include a codat confidence table 400, for example as illustrated in FIG. 53A, for each peer group of which the peer 200 is a member peer, that may be used to record the (keyword, codat) relationships for peers in the particular peer group.

[0255] In one embodiment, there may be a peer confidence table 402 as illustrated in FIG. 53B that includes peer confidence information for those peers for which the peer 200 has (keyword, codat) information. In a peer confidence table 402, for each keyword 406 representing an interest of the peer 200, there may exist one or more peer confidences 410 each corresponding to a particular peer that provided a particular codat 500. In one embodiment, there may be a separate peer confidence table 402 for each peer group in which the peer 200 is a member peer. In one embodiment, the peer confidence table(s) 402 may be included in codat confidence table(s) 400 as illustrated in FIG. 53A. In one embodiment, peer confidence tables 402 may be used when searching for a codat 500.

[0256] In one embodiment, there may be a peer confidence table 404 that includes peer confidence information for peers across all the peer groups to which the peer 200 belongs, as illustrated in FIG. 53C. This table 404 may be used, for example, in calculating peer group-independent peer confidence values.

[0257] In one embodiment, the decentralized trust mechanism may use data structures such as object-oriented programming language classes to represent the different trust components. In one embodiment, the classes may include a codat confidence class, a peer confidence class, and a risk class.

[0258] In one embodiment, a codat confidence class may be used in evaluating the codat trust component according to a keyword. In one embodiment, the codat confidence class may include, but is not limited to, keyword, codat identifier, local flag, and confidence value as elements of the class. In one embodiment, the confidence value may have two metrics: popularity, and relevance to keywords. Popularity may be monotonically increasing and may be incremented at the provider each time the codat is requested. The relevance may be in a range of relevance values, and may be in a range, for example (−1, 0, 1, 2, 3, 4) in one embodiment, as described below. The codat confidence class may be instantiated to implement codat confidence 408 as illustrated in FIGS. 50A and 51.

[0259] A peer confidence class may be used in evaluating the codat peer trust component according to a keyword. In one embodiment, the peer confidence class may include, but is not limited to, class keyword, peer identifier and confidence value as elements of the class. In one embodiment, in addition to the codat confidence metrics above, the running average of the popularity of each codat accessed from this peer for a given keyword may also be kept. The peer confidence class may be instantiated to implement peer confidence 410 as illustrated in FIGS. 50A, 50B and 51.

[0260] In one embodiment, trust may be a function of peer confidence and risk. A risk class may be used in evaluating a peer's risk trust component. In one embodiment, the risk class may include, but is not limited to, peer identifier, integrity of the codat, accessibility and performance.

[0261] In one embodiment, the peer confidence and risk classes may be used in determining if another peer, for example a peer offering to provide codat in a particular area of interest, is able to cooperate and is thus trustworthy.

[0262] The above describes how two components of trust relationships, confidence and risk, map to hardcoded information. The following discusses embodiments of mechanisms for the calculation and propagation of such information to form a complex chain of relationships, and describes embodiments of methods to rate a propagated degree of trust.

[0263] In one embodiment, a trust value may be assigned to a peer. FIG. 54 illustrates one embodiment of a table 420 of trust values 422 and the significance of or meaning 424 corresponding to the trust values 422. In the embodiment illustrated in FIG. 54, a peer may have a trust value of −1, 0, 1, 2, 3, or 4. Note that other embodiments may use other trust values and/or meanings corresponding to the trust values.

[0264] In the exemplary embodiment illustrated in FIG. 54, for the trust values of 0 and −1, the associated codat is never accessed. In one embodiment, the trust value may be propagated through a transaction pipe (which may be described as a path). In one embodiment, the trust value of a target for a single path, V_(path)(T), from peer S to peer T through peers P_(i), (i=1, 2, . . . , n) may be calculated as in the following formula: $\begin{matrix} {{V_{path}(T)} = {\frac{1}{4n}\left( {\sum\limits_{i = l}^{n}\quad {V\left( P_{i} \right)}} \right) \times {V(T)}}} & \left. 1 \right) \end{matrix}$

[0265] Here, V(P_(i)) is the trust value of the peer, P_(i), who provides the information. In the exemplary embodiment illustrated in FIG. 54, V(P_(i)) is one of 1, 2, 3, or 4. V(T) is the trust value on the target peer, T. Note that in other embodiments other formulas for calculating V_(path)(T) may be used.

[0266] For multiple paths, in one embodiment the final trust value may be the average of all the propagated trust values. As an example, assume there are two paths from peer A to peer D. The first path is through peer B and C, the second one is though B, E and F. C trusts D with a value of 3, B trusts C as a recommender with a value 2, and A trusts B as recommender with a value of 3. Thus: $\begin{matrix} {{V_{1}(D)} = {{\frac{{V(B)} + {V(C)}}{8} \times {V(D)}} = {{\frac{3 + 2}{8} \times 3} = 1.88}}} & \left. {1'} \right) \end{matrix}$

[0267] Using the same method, assume the trust value of the second path V₂(D) is 2.15. In this example, the trust value A gives D is the average of two paths, 2.01. In one embodiment, in addition to the propagation of trust information, reputation may also be initialized and updated. (Note that the values calculated in these and other examples herein may be rounded or truncated for simplicity, but in application may or may not be rounded or truncated.)

[0268] In one embodiment of the trust mechanism, there may be two values for peer confidence and codat confidence. The codat confidence value is the information to be propagated and the peer confidence value is the carrier information to be used for weighting. In one embodiment, equation 1) may be transformed as follows, where the codat confidence and peer confidence are the relevance metrics for codat within a given peer group: $\begin{matrix} {{{codat}\quad {confidence}_{path}} = {\frac{1}{4n}\left( {\sum\limits_{i = l}^{n}{{peer}\quad {{confidence}\left( P_{i} \right)}}} \right) \times {codat}\quad {confidence}}} & \left. 2 \right) \end{matrix}$

[0269] Propagation of confidence values may be employed when requesting information remotely and successfully. In one embodiment, when a remote request for information succeeds, the provider sends the codat confidence object to the requester. If after computing codat confidence_(path), the requester wants the codat, then the codat may be sent to the requester (or alternatively the requester may access the codat remotely). Even if the codat transfer (or access) occurs between P₁ and P_(n), the codat confidence_(path) remains as if the data was received through the pipe. In one embodiment, propagation may also be employed when giving feedback to codat providers. The updated codat confidence object from a requester may be propagated back to the provider. Note that in other embodiments other formulas for calculating codat confidence_(path) may be used.

[0270] When updating trust value, each peer may update several (e.g. three) kinds of confidence tables. In addition, the updates may be based on a peer's rating as well as on the feedback rating. Trust value updating may be illustrated using some examples. As one example of trust value updating, a peer may update its codat confidence using its own rating and the codat confidence propagated from remote peers. The propagated popularity may be, for example, a running average. This example focuses on the confidence and quality updating. In one embodiment, a new codat confidence may be a function of the old codat confidence, the propagated codat confidence, and the user rating:

[0271] new codat confidence=F(old codat confidence, propagated codat confidence, user rating)

[0272] The following is an exemplary function that may be used to calculate a new codat confidence in some embodiments:

new codat confidence=(a×old codat confidence)+(b×propagated codat confidence)+(c×user rating)   3)

[0273] where (a+b+c)=1.0, and a, b and c are nonnegative real numbers. a, b and c may be used as weights for relative importance of the old codat confidence, the propagated codat confidence, and the user rating, respectively, when calculating new codat confidence. Note that in other embodiments other formulas for calculating new codat confidence may be used.

[0274] In one embodiment, the user's personal rating may be the most important criteria for a user, and thus c may be given more weight (e.g. c=0.70). In one embodiment, if the new popularity value is greater than the old popularity value, then the propagated codat confidence may be given more weight (e.g. a=0.10 and b=0.20); if the new popularity value is less than the old popularity value, the old codat confidence may be given more weight (e.g. a=0.20 and b=0.10). If they are equal, the old codat confidence and the propagated codat confidence may be given equal weight. Thus, using weights, more popular codat may be given an edge. Note that other schemes for distributing weights may be used in other embodiments.

[0275] In one embodiment, the user rating may be received as user input. It is possible that neither the old codat confidence nor the propagated codat confidence is available. In this case, the old codat confidence and the propagated codat confidence may be preset, for example, to 1. A similar rule may be applied to one or more of the other exemplary functions herein.

[0276] As another example of trust value updating, a peer may update an old codat confidence using feedback. The peer may have a peer confidence corresponding to the peer who provided the feedback. In one embodiment, a feedback may be defined as a reverse-propagated codat confidence from another peer. In one embodiment, a new codat confidence may be a function of the old codat confidence, the feedback, and the peer confidence corresponding to the peer that provides the feedback:

[0277] new codat confidence=F(old codat confidence, feedback, peer confidence of feedback peer)

[0278] The following is an exemplary function that may be used to calculate a new codat confidence in some embodiments: $\begin{matrix} {{{new}\quad {codat}\quad {confidence}} = \frac{\quad \left( {{{old}\quad {codat}\quad {confidence}} + \left( {{feedback} \times \frac{{peer}\quad {confidence}_{{feedback}\quad {peer}}}{4}} \right)} \right)}{2}} & \left. 4 \right) \end{matrix}$

[0279] In at least some cases, the peer may not have peer confidence for the peer who provides the feedback, so the peer confidence in the feedback peer may be preset, for example, to 1. Note that in other embodiments other formulas for calculating new codat confidence may be used.

[0280] In yet another example of trust value updating, a peer may update the peer confidence of an information provider in a peer group. In this example, the peer may not receive information from other peers on a provider's performance. Instead, the peer may itself generate an opinion of the provider, associated with one or more keywords. The peer may know the codat confidence, relevance metric of the codat the provider has provided to the peer. In one embodiment, a new peer confidence may be a function of the old peer confidence and the set of codat confidences related to the provider:

[0281] new peer confidence=F(old peer confidence, set of codat confidences related to the provider)

[0282] The following is an exemplary function that may be used to calculate a new peer confidence in some embodiments: $\begin{matrix} {{{new}\quad {peer}\quad {confidence}} = \frac{\quad {{{old}\quad {peer}\quad {confidence}} + {\frac{1}{K}{\sum\limits_{a \in K}{{codat}\quad {confidence}_{provider}}}}}}{2}} & \left. 5 \right) \end{matrix}$

[0283] where |K| is the number of keywords a in K related to the provider. Note that in other embodiments other formulas for calculating new peer confidence may be used.

[0284] The trust mechanism may employ numerous updating functions, and in one embodiment, a Bayesian approach may be used. Using a Bayesian approach, current data may be used to derive what the a posteriori model looks like.

[0285] To make these trust values more meaningful for users, one embodiment may include a cooperation threshold. If a peer confidence value corresponding to another peer is greater than the cooperation threshold, the other peer may be considered cooperative. Otherwise, the other peer may be considered uncooperative, and the user of the peer may decide that interaction with the other peer may involve too much risk. The cooperation threshold may be calculated based on the risk value, the codat confidence value(s) and an importance value. The importance value may be used to indicate how important the cooperation is to the user. A user may be willing to take a risk, i.e., override the trust mechanism's recommendation, even though the peer confidence may be low. In one embodiment, the importance may have a value of, for example, (−1, 0, 1, 2, 3, 4) and may be input by users through a GUI. In one embodiment, the importance value may be initially set to a default, e.g. 2. In one embodiment, the risk value may be in a range from, for example, 0 to 4, where 0 implies no risk and 4 implies maximum risk. In one embodiment, the risk value may be statistically computed using peer accessibility and performance information. In one embodiment, a network quality of service study method may be adopted to compute the risk value.

[0286] In one embodiment, if the following comparison is true, then the cooperation threshold is met: $\begin{matrix} {\left( {{peer}\quad {confidence} \times {importance}} \right) > \frac{{Risk}_{peer}}{\frac{1}{K}{\sum\limits_{a\overset{.}{\in}K}{{codat}\quad {confidence}_{peer}}}}} & \left. 6 \right) \end{matrix}$

[0287] Here, K is the set of all keywords, a, for the given peer for which there are codat confidence values across all peer groups, and |K| is the number of such keywords. The codat confidence values corresponding to the peer (related to a particular keyword k) may be used to represent the experienced confidence in the peer. Assuming the importance is constant, if the risk is high and the experience is not good, the threshold will tend to be high. In this case, the peer confidence may not be higher than the threshold. Note that in other embodiments other comparisons for determining if the cooperation threshold is met may be used.

[0288] Security and the Trust Mechanism

[0289] Security may address privacy, authentication, integrity, and/or non-repudiation. Various cryptographic techniques and protocols may be implemented, for example, to attempt to guarantee that a conversation is private, to authenticate a user, to insure the integrity of data, and to assure that a transaction cannot be repudiated by its originator.

[0290] To the above cryptographic list, secure access to codat, or authorization, may be added. Codat may include static as well as dynamic or executable data, which may be locally or remotely stored. Codat may also include abstractions such as routes or paths codat might take in a network, some of which may be privileged. In one embodiment, the authorization mechanism described herein may not be a specific authorization solution, but instead may be an open mechanism that allows the implementation of various secure codat access schemes based on the mechanism. The trust mechanism may be a mechanism for peer-to-peer distributed security in which some or all of the above security features may be deployed, if desired.

[0291] In one embodiment, the trust mechanism may provide a trust spectrum as illustrated in FIG. 55 that has Certificate Authority signed certificates 700 at or near one endpoint, and self-signed certificates 702 at or near the other. In one embodiment, the trust mechanism may not require a true, distributed Public Key Infrastructure (PKI), but rather may provide for the creation of a trust spectrum that neither requires nor prohibits the presence of a PKI. At what point of trust in the spectrum a peer group chooses to communicate may be up to the participants in that group. A peer may belong to two or more different peer groups each implementing a different security model on different levels of the trust spectrum. In a trust spectrum, unique peer identities may be established to enable authentication and the assignment of the peers' associated access policies within a peer group, e.g., authentication and authorization.

[0292] In embodiments of the trust mechanism, a method may be provided for creating and distributing signed certificates in a peer-to-peer network Some embodiments may provide a mechanism for creating and distributing public keys given a peer-generated, private-public key pair. In some embodiments, certificate creation may include using a Certificate Authority whose signature appended to a certificate guarantees the certificate's content for any recipient that has secure access to the Certificate Authority's public key. In one embodiment, the Certificate Authority's public key may be included in a root certificate on the recipient's system.

[0293] In an embodiment, any peer, including a recognized Certificate Authority, may join a peer group and offer its services (assuming it meets membership requirements, if any). The peer group members may assign a level of trust or peer confidence to that peer, as well as to each other. Mobile credentials, e.g. how to make a system's private security credentials securely available, may also be provided.

[0294] In some embodiments, peer-to-peer zero-dollar-cost certificates may be provided. In one embodiment, peer-to-peer zero-dollar-cost certificates may include self-signed certificates that may be exchanged between peers. In one embodiment, peer-to-peer zero-dollar-cost certificates may include certificates signed or cosigned by a trusted third party (e.g. a trusted peer in a peer group). In one embodiment, the trust mechanism may not prohibit very strong security, e.g., strong security mechanisms such as may be used on the Internet.

[0295] Users of self-signed certificates may be left open to “imposter in the middle” attacks. For example, if a peer A receives a peer B's self-signed certificate in a security advertisement corresponding to peer B. peer A may have no way to guarantee that in fact the certificate was received from peer B, and conversely, the same is true for peer B. An intruder, say peer C, may be in the middle of a conversation seeing everything in clear text, and having given a “faked” self-signed certificates to both peer A and peer B, may be pretending to be one or both of them. Since peer C possesses both peer A and peer B's public keys, peer C's presence may be undetectable. While it may take a great deal of effort to steal peer A and peer B's identities, it may be done using advertised, public information and information acquired as the imposter-in-the-middle. In one embodiment of a peer-to-peer network, for an intruder to steal a peer's identity, all of a peer's advertisements must be duplicated, possible encrypted passwords must be known, and pipe endpoint resolution spoofed. This may be possible with self-signed certificates and this attack. Such an intruder could fully participate in a peer group using this stolen role.

[0296] However, for some classes of applications, this behavior may be acceptable if the above threats are clearly understood by the users. For example, a family may form a peer group to participate in secure instant messaging among the family members. The underlying messages may be private, for example secured with TLS using 1024 bit RSA, 128-bit RC4, and SHA-1. The family may not worry that an imposter might try to intercept their conversations. This is a cost/risk decision whose risk is likely extremely small.

[0297] If the “imposter in the middle” attack is an unacceptable risk, and peer-to-peer zero-dollar-cost certificates are desired, a more secure spectrum point may be used by exchanging certificates in person, for example using infrared or floppy disks. This is eyeball-to-eyeball trust, and in certain peer groups, this is achievable and very secure.

[0298] If additional security is desired, then peer group members may delegate certificate signature authority to selected members of a peer group. For example, if peer A wants to acquire a signed certificate from peer B that is a Certificate Authority, peer A generates a public, private key pair, sends the public key, algorithm parameters and personal identification to peer B, and then proves ownership of the private key. Peer B may accomplish the latter with a challenge encrypted in the public key and sent to peer A that owns the private key. Only peer A can decrypt the challenge, again encrypt it in peer A's private key, and send it back to peer B for verification. Once ownership is verified, peer B may issue a signed certificate to peer A. To verify that peer B indeed signed the certificate, peer A must have peer B's public key. In addition, if peer A wants to communicate securely with peer C, then he too must have peer B's public key and must trust peer B's signature. This makes the imposter-in-the-middle attack very difficult since peer B's signature is created with his private key, and peer A, and peer C have peer B's public key. This taken with strong authentication, and authorization may prevent role theft.

[0299] In one embodiment, a method similar to the above may be applied to create a “web of trust”-like signed certificate distribution in a peer group. A key ring of signed certificates may be created, and trust assigned using personal input obtained, for example, using the trust mechanism.

[0300] In one embodiment, a peer group-Certificate Authority, e.g. peer B, to both sign and distribute signed certificates to peer group members. If peer B has signature authority in the peer group, and peer A is a peer group member that trusts peer B, then peer A must have peer B's public key. One way to accomplish this is to have a root certificate on each peer in the peer group when the peer-to-peer software is loaded. These root certificates may be generated, for example, by a trusted peer-to-peer organization or satellite that may be a true Certificate Authority. In a peer-to-peer environment implemented in accordance with a peer-to-peer platform, for example the peer-to-peer platform described later in this document, root certificates may be included with releases of the peer-to-peer platform.

[0301] Given such a bootstrap mechanism, peer B may request a signed certificate from any of the trusted satellites, their goal being to propagate signing authority within peer groups without taking on the entire responsibility. Peer A may then, in the same way, open a secure, TLS session with peer B's system receiving peer B's satellite-signed X.509v3 certificate in the TLS handshake, verifying peer B's authenticity, and may acquire a certificate signed by Peer B using a totally secured connection. At the same time, peer A saves peer B's certificate on a key ring for future use of peer B's public key. Here, for example, peer A might want to send peer B some private email, or chat privately with peer B.

[0302] Peer B, and other peer group Certificate Authorities may maintain certificate revocation lists to assure that any transaction with a known, breached certificate cannot take place, thus taking security one step closer to a true peer group PKI. That final step may be taken by placing known and trustworthy Certificate Authorities into the peer group and delivering their public keys in root certificates, for example with the peer-to-peer platform.

[0303] In one embodiment, the trust mechanism may be used in calculating codat trust based on a peer's reputation in a given peer group. Since a certificate is one form of codat, in one embodiment the trust mechanism may be applied to a peer's peer group key ring, i.e., a peer group member's collection of signed certificates for a given peer group. In the following discussion, it is assumed that the keyword is “signed certificates” or another keyword used to signify signed certificates, and that the expected response is the search target's peer group key ring contents. In one embodiment, for a peer group(i), a peer may include one or more tables as illustrated in FIGS. 56A and 56B for matches to the keyword “signed certificates,” in which codat confidence is replaced with certificate confidence. In one embodiment, the tables illustrated in FIGS. 56A and 56B may be included in the codat confidence table and/or the peer confidence table(s) as illustrated in FIGS. 53A-53C.

[0304] In one embodiment, an exemplary certificate confidence table 430 as illustrated in FIG. 56A may be the peer's key ring trust table for the peer group(i), and each entry 432 may be associated with a signed certificate. Each certificate confidence entry 432 may indicate a trust in a particular path to another peer corresponding to the certificate. In FIG. 56B, the peer confidence values in table 440 may be user defined, and each peer's entry may have, for example, two values. A first value, peer confidence_(certificate) 442, indicates a user's confidence in using a given peer's certificate, i.e. public key, for securing a transaction. A second, peer confidence_(recommender) 444, rates that peer as a recommender, or certificate cosigner.

[0305] As an example of using peer confidence_(recommender), if a peer A receives a peer C's certificate from a peer B, and peer A does not know the subject, peer C, of that certificate and peer B does, then it may need to be determined whether peer A is willing to use peer B's recommendation of peer C. Peer B may have assigned a certificate confidence value to peer C's certificate. The peer confidence_(recommender) may be used to determine if peer A uses the certificate as recommended by peer B, and to what degree.

[0306] As another example of using peer confidence_(recommender), the value may be used by a peer A to rate a peer B's signature, for example if peer B cosigns a certificate.

[0307] Trust may be transitive. In one embodiment, transitivity may be measured, and the degree of transitivity may be user-definable. Peer confidence_(recommender) 444 may be used as an indication of the transitivity of trust. For example, if the peer confidence_(recommender) is less than, for example, 4, the trust relationship may be weakly transitive. This is from the local peer's perspective and may be based on reputation.

[0308] In one embodiment, certificate confidence 432 may be initially, for example, 4.0, as a default value for certificates originating on a peer. In one embodiment the certificate confidence corresponding to a certificate may be weighted by the trust path and the peer confidence_(recommender) value if the source is not the issuer. The following is an exemplary method to calculate entries 432 (trust paths) in a certificate confidence table 430 as illustrated in FIG. 56A.

[0309] Under a web of trust, if a peer A's certificate is self-signed, a peer B knows peer is A, and peer B gets peer A's certificate from peer A who is then the certificate's subject, then using formula 2) for a path of length l: $\begin{matrix} {{{certificate}\quad {confidence}_{path}} = {\frac{{peer}\quad {{confidence}_{certificate}({subject})}}{4} \times {certificate}\quad {confidence}_{provider}}} & \left. 7 \right) \end{matrix}$

[0310] In one embodiment, the certificate confidence may have an initial value, e.g. 4.0, and peer confidence_(subject) may default to a value, e.g. 2.0, or average, but may each be modified by the user.

[0311] Thus, for peer A: ${{certificate}\quad {confidence}_{path}} = {\frac{{peer}\quad {{confidence}_{certificate}\left( {{peer}\quad A} \right)}}{4} \times 4.0}$

[0312] Thus, if peer B's peer confidence in peer A is 3.0, the certificate confidence_(path) is 3.0. This is peer B's confidence in peer A's certificate.

[0313] Next, if a peer C receives peer A's certificate from peer B, and peer C's peer confidence_(recommender) in peer B's is 2.5, and peer C does not know peer A, then: $\begin{matrix} {{{certificate}\quad {confidence}_{path}} = {\frac{1}{4} \times \frac{\left( {{{peer}\quad {confidence}_{recommender}} + {{peer}\quad {{confidence}_{certificate}({subject})}}} \right)}{2} \times {certificate}\quad {confidence}_{provider}}} & \left. 8 \right) \end{matrix}$

[0314] In one embodiment, a default peer confidence_(recommender) value may be 1.0, or minimal, as relationships may be initially weakly transitive.

[0315] Given the above, the certificate confidence_(path) for peer A's certificate is: ${{certificate}\quad {confidence}_{path}} = {{\frac{\left( {2.5 + 2.0} \right)}{8} \times 3.0} = 1.69}$

[0316] Here the certificate confidence for peer A's certificate on peer B's system is 3.0 (from the first example), and is used in the calculation in lieu of the default 4.0 value. Peer C rates peer B's recommendations at 3.0, and on peer C's key ring, peer A's certificate has a certificate confidence of 1.69.

[0317] In one embodiment, a certificate may have multiple signers. For example, if peer A's certificate is self-signed and cosigned by peer B, and peer C obtains the cosigned certificate from peer B, then the certificate confidence_(path) is as above, and equals 1.69. In other words, peer C trusts peer B's certificate confidence in peer A.

[0318] Alternatively, if peer B cosigns the certificate, peer C gets peer A's certificate from peer A, and does not know peer A, peer C's peer confidence_(certificate) in peer A is 2.0. Since peer C rates peer B's peer confidence_(recommender) at 2.5, the certificate confidence_(path) is: ${{certificate}\quad {confidence}_{path}} = {{\frac{\left( {2.5 + 2.0} \right)}{8} \times 4.0} = 2.25}$

[0319] Alternatively, if peer C's peer confidence in peer A is 3.0, then: ${{certificate}{\quad \quad}{confidence}_{path}} = {{\frac{\left( {2.5 + 3.0} \right)}{8} \times 4.0} = 2.75}$

[0320] As another example, peer C may take peer B into account as a cosigner. Peer C may make peer B's peer confidence_(recommender) equal to 0, and not use transitivity of trust with respect to peer B. In this case, the above certificate confidence_(path) will be 3.0. The above may be applied to certificates with n signatures, n−1 cosigners, and the initial signer as P_(n): $\begin{matrix} {{{certificate}\quad {confidence}_{path}} = {\frac{\left( {{\sum\limits_{i = l}^{n - 1}\quad {{peer}\quad {{confidence}_{recommender}\left( P_{i} \right)}}} + {n\left( {{peer}\quad {{confidence}_{certificate}\left( P_{n} \right)}} \right)}} \right.}{2 \times 4 \times n} \times {certificate}\quad {confidence}_{provider}}} & \left. 9 \right) \end{matrix}$

[0321] In one embodiment, if a certificate is signed by a peer group Certificate Authority, then that Certificate Authority's root certificate may be included on all peer group member peers. Such Certificate Authority signed certificates may have a default certificate confidence_(provider) of, for example, 4.0, and the Certificate Authority may have default peer confidence_(certificate) and peer confidence_(recommender) of, for example, 4.0, thus giving all such certificates a local default certificate confidence_(path) of 4.0, in one embodiment. Thus, the following is a certificate for peer A received from a Certificate Authority: ${{certificate}{\quad \quad}{confidence}_{path}} = {{\frac{\left( {4.0 + 4.0} \right)}{8} \times 4.0} = 4.0}$

[0322] A user may still apply formula 7) so that if peer B receives peer A's Certificate Authority signed certificate from peer A, and peer confidence_(certificate)(peer A) is 3.0, then peer A's certificate confidence will be 3.0. This may affect peer B's willingness to do financial transactions with peer A, or willingness to send peer A private mail using S/MIME, for example. Such judgments may be personal calls made by a peer. Downgrading such a certificate may typically be rare.

[0323] At any point in time, the degree of transitivity of a given peer's reputation as a recommender with respect to another peer may be either too optimistic or pessimistic. Thus, in one embodiment, a mechanism may be provided to measure and correct, if necessary or desired, experience with respect to a peer's recommendations over time. This mechanism may be provided since peer confidence_(recommender) of each such recommender may be explicitly defined.

[0324] Let K be the set of all certificate confidences for which there are non-default values for both peer confidence_(certificate) and peer confidence_(recommender) for certificates uniquely recommended or cosigned by a given peer, P₀. If K is empty, then there may not be sufficient experience to reevaluate P₀. In one embodiment, the average recommendation for P₀ may be calculated by defining: ${{cosigner}\quad {peer}\quad {{confidence}_{recommender}\left( P_{0} \right)}} = {\frac{1}{K}{\sum\limits_{\alpha \in K}\left( {{certificate}\quad {confidence}_{path}} \right)_{\alpha}}}$

[0325] where |K|=number of certificates in K. The direct peer confidence may then be calculated, e.g., as if each certificate were obtained directly from the same subjects, e.g., peer confidence_(recommender) is set to 0: ${{direct}\quad {peer}{\quad \quad}{confidence}} = {\frac{1}{K}{\sum\limits_{\alpha \in K}\left( {{peer}\quad {confidence}_{certificate}} \right)_{\alpha}}}$

[0326] The two values may allow a comparison of how the local peer's ratings correlate with the remote peer's ratings, and permit the local peer to adjust its ratings accordingly if they do not agree. For example, a peer A may obtain a peer B's certificate and a peer C's certificate from a peer D. If peer A gives peer D a peer confidence_(recommender) value of 2.5, and the certificate confidence values of peer B and peer C on peer D are 2.6 and 3.0 respectively, then: ${{cosigner}\quad {peer}\quad {confidence}_{{peer}\quad d}} = {\frac{2.6 + 3.0}{2} = 2.8}$

[0327] If peer A rates peer B and peer C with peer confidence_(certificate) values of 3.0 and 3.8, respectively, then by applying formula 7): ${{direct}\quad {peer}\quad {confidence}} = {\frac{3.0 + 3.8}{2} = 3.4}$

[0328] Thus, peer A may be underrating peer D, and may adjust the peer confidence_(recommender) value for peer D if desired.

[0329] Peer Identity and Authentication

[0330] In one embodiment, for a peer to be authenticated in a peer group, a peer identity may be required. In one embodiment, a peer identity may be unique across all peers. In addition, certificates issued to a peer may have a unique user identifier (UUID). For X.509 certificates this is an X.500 distinguished name that is unique across the Internet. An example is:

[0331] (CN=John Doe,

[0332] OU=Widgets,

[0333] O=ACME, Inc.,

[0334] C=FR)

[0335] Pretty Good Privacy (PGP) certificates also require user information but may be less stringent about the details. The information may be “identity” information about the user such as the user's name, identifier, photograph, etc. In either case, a unique UUID may be generated. For example:

[0336] (CN=UserName,

[0337] OU=<twenty-digit pseudo-random ID>,

[0338] O=<organization name>,

[0339] C=Country)

[0340] A concatenation of the above name identifiers may also be suitable for a PGP certificate. In one embodiment, given that each peer has its own certificate, self-signed, cosigned, or Certificate Authority-signed, a peer identity may be created by hashing the concatenation of the UUID and the public-key fields, signing this hash with the private key, and using the digital signature as the identity. Since such a signature may be large, for large keys, it may be the key length, and the first twenty bytes, for example, may be used as a digital fingerprint. Other possible fingerprint mechanisms are the MD5 or SHA-1 hash of the private key. Both are reproducible only by the owner of the private key, and verifiable, and may be used as a challenge. The identity may be used as the peer's credential in messages, for example peer-to-peer platform messages.

[0341] Given a unique identity, a peer may use the identity in accordance with a peer group's authentication policy (which also may require a password to be created) to grant or receive, for example, group privileges, account privileges, and a renewal period. This may be done over a private connection to protect the password. Finally, a group credential may be returned to the peer group member that acknowledges and embodies the authorized privileges. This same credential may then be required whenever any of the associated peer group services are used.

[0342] In one embodiment, such a method may require peer-to-peer platform authorization services. Peer group members may need to be aware of which peers or systems provide authorization services. In one embodiment, a source for lists of addresses (e.g. URIs) for authorization peers may be published, for example using a peer-to-peer platform advertisement mechanism as described later in this document.

[0343] Key Rings

[0344] Over time, peers may acquire a local collection of certificates with their associated public keys. Such a collection may be referred to as the user's key ring. A peer may have at least one personal certificate. Thus, the key ring may be non-empty. A peer may both publish the existence of this key ring and distribute its contents on request, for example using peer-to-peer platform protocols as described for the exemplary peer-to-peer platform below. These peer-to-peer platform protocols may permit the creation of advertisements, for example, a peer may have one or more corresponding advertisements that may contain static information describing that peer. In one embodiment, the peer-to-peer platform peer advertisement may have an XML tag reserved for security, and to add security the peer's security pipe identifier may be advertised in that XML field.

[0345] In one embodiment, each certificate on a peer key ring may include a reference that may include, but is not limited to, the peer identifier, the address (e.g. email address) of the certificate's subject or owner, and the local peer's certificate confidence for that certificate. This list of references may be considered the peer's key ring list, and may be accessible, for example through the peer's security pipe, and thus, may be used to publish those keys that are exportable by that peer. In one embodiment, a certificate may be accessed using either its peer identifier or domain name reference using the same pipe.

[0346] In one embodiment, the peer-to-peer platform may provide one or more protocols that may be leveraged by embodiments of the trust mechanism to support, advertise and access key ring lists and certificates as described above. In one embodiment, the absence of a security pipe identifier in the peer advertisement may imply that security services are not supported on that peer. In addition, in some embodiments, the peer advertisement may not include the security pipe identifier in order to reduce the size of these advertisements, and to make information like the security pipe identifier available on demand. In this case, the security pipe identifier may be available through a peer information protocol of the peer-to-peer platform for obtaining peer information. In one embodiment, at least the availability of security services is part of the peer advertisement.

[0347] Peer-to-Peer Platform Transport Layer Security (TLS)

[0348] In one embodiment, for private, peer-to-peer communication, TLS may be implemented within the constraints of the security model's trust spectrum discussed in the previous sections, and on top of the peer-to-peer platform's core protocols. In one embodiment, a TLS_RSA_WITH_RC4_(—)128_SHA cipher suite from the peer-to-peer platform's security toolbox may be used. One embodiment may employ Claymore System's PureTLS code.

[0349] In one embodiment, self-signed certificates may be sent in the TLS handshake at the least secure end-point of this spectrum. Thus, as has been previously discussed, the imposter-in-the-middle attack may be possible, as it is for any PGP-like Web-of-Trust where self-signing cannot prevent forged certificates.

[0350] In one embodiment, cosigned certificates may be more difficult to forge. For example, consider a peer A that requires that all certificates it uses be cosigned by a peer B. Peer A initiates a private communication with a peer C, and a peer D is an “imposter in the middle.” Peer D may forge peer C's certificate that is cosigned by peer B peer D. However, to be successful, Peer D will also have to forge peer B's certificate that is resident on peer A's system.

[0351] Thus, in some embodiments, two or more points in the trust spectrum may be implemented, e.g., self-signed and Certificate Authority signed certificates. Some embodiments may also include cosigning of certificates and/or satellite Certificate Authorities, among other measures, which may individually or together offer better than “pretty good privacy” TLS for low or no cost.

[0352] Peer Group Authentication

[0353] Some embodiments of the exemplary peer-to-peer platform described below may include a framework for Pluggable Authentication Modules (PAMs). Using peer identities, a peer group authentication module may be added to the PAM implementation of the peer-to-peer platform. In one embodiment, a peer group member that has an authentication level of authority may do the initial authentication. The initial authentication may return a peer group credential which may include one or more of, but is not limited to, the following fields:

[0354] Authorization privileges, e.g.:

[0355] Data access: e.g. read and write.

[0356] Authentication level: e.g. trial membership, full member, and authority.

[0357] Membership expiration date.

[0358] Hash of member's password and the algorithm used.

[0359] Peer Identity of initiating authority.

[0360] Digital Signature of the previous fields by initiating authority.

[0361] In one embodiment, the initial authentication may be done using TLS to keep the user's password private. Further authentication(s) to access other group members' systems may include the above credential, and thus may be challenged by requesting the password and reproducing the hash, after first verifying the credential with the public key of the initiating authority.

[0362] Thus, an authentication infrastructure may be included in a peer-to-peer platform, such as the exemplary peer-to-peer platform described below.

[0363] Peer-to-Peer Platform

[0364] The following is a description of an exemplary network computing platform designed for peer-to-peer computing which may be used to implement peer-to-peer environments in which embodiments of a system and method for implementing mobile agents in peer-to-peer networking environments as described above may be implemented. Note that this is an exemplary peer-to-peer platform, and embodiments of the system and method for implementing mobile agents in peer-to-peer networking environments as described above may be implemented in other peer-to-peer environments and with other peer-to-peer platforms.

[0365] The network computing platform may be referred to as a peer-to-peer platform. The peer-to-peer platform may be used to build a wide range of distributed services and applications in which every device is addressable as a peer, and where peers can bridge from one domain into another. The peer-to-peer platform may enable developers to focus on their own application development while easily creating distributed computing software that is flexible, interoperable, and available on any peer on the expanded Web. The peer-to-peer platform may enable software developers to deploy interoperable services and content, further spring-boarding the peer-to-peer revolution on the Internet. The peer-to-peer platform addresses the problems of prior art peer-to-peer systems by providing a generic and service-agnostic peer-to-peer platform that may be preferably defined by a small number of protocols. Each protocol is preferably easy to implement and easy to be adopted into peer-to-peer services and applications. Thus, service offerings from one vendor may be used, perhaps transparently, by the user community of another vendor's system.

[0366] The peer-to-peer platform extends peer-to-peer computing to enable a wide range of distributed computing applications and overcome the limitations typically found in prior art peer-to-peer applications. The peer-to-peer platform is a network computing technology that provides a set of simple, small, and flexible mechanisms that can support peer-to-peer computing on any platform, anywhere, and at any time. The peer-to-peer platform generalizes peer-to-peer functionality and provides core technology that addresses the limitations of prior art peer-to-peer computing technologies.

[0367] The peer-to-peer platform is a modular platform that provides simple and essential building blocks for developing a wide range of distributed services and applications. The peer-to-peer platform specifies a set of protocols rather than an API. Thus, the peer-to-peer platform can be implemented in any language on any Operating System to provide solutions ranging from providing a simple protocol-based wrapper that enables a small device to join a network of peers to developing a fully integrated application that supports metering, monitoring, high-level security and communication across server-class systems.

[0368] In one embodiment, the peer-to-peer platform architecture may include, but is not limited to, protocols, advertisements, and core services. Network protocol bindings may be used to preferably ensure interoperability with existing content transfer protocols, network transports, routers, and firewalls. The peer-to-peer platform may be used to combine network nodes (peers) into a simple and coherent peer-to-peer network computing platform. Embodiments the peer-to-peer platform may be directed at providing several benefits including one or more of, but not limited to, no single point of failure, asynchronous messaging, the ability for peers to adapt to their network environment, and moving content towards its consumers.

[0369]FIG. 2 illustrates one embodiment of peer-to-peer platform software architecture at the conceptual level. The peer-to-peer platform may include several layers. In one embodiment, the software stack may be described using three layers; a peer-to-peer platform (core) layer 120, a service layer 140 and an application layer 150. In one embodiment, the peer-to-peer platform may include a core layer 120 that defines and encapsulates minimal primitives that are common to peer-to-peer networking, including, but not limited to, peers 110, peer groups 122, peer discovery 124, peer communication (e.g. pipes) 126, peer monitoring 128, and associated security primitives 130. This layer may be shared by all peer-to-peer devices so that interoperability becomes possible.

[0370] A peer may be defined as any entity that runs some or all of one or more protocols provided by the peer-to-peer platform core layer. As such, a peer may manifest in the form of a processor, a process or a device. A peer may be anything with a digital heartbeat that supports the peer-to-peer platform core, including sensors, servers, PCs, computers up to and including supercomputers, PDAs, manufacturing and medical equipment, phones and cellular phones. In order to interact with other peers (e.g. to form or join peer groups), the peer needs to be connected to some kind of network (wired or wireless), such as IP, Bluetooth, or Havi, among others.

[0371] The peer-to-peer platform may provide mechanisms through which peers may discover each other, communicate with each other, and cooperate with each other to form peer groups. Peers may discover each other on the network to form transient or persistent relationships called peer groups. A peer group is a collection of peers connected by a network that share a common set of interests and that have agreed upon a common set of rules to publish, share and access any computer content (code, data, applications, or other collections of computer representable resources), and communicate among themselves. Peer groups may also be statically predefined. The peers in a peer group may cooperate to provide a common set of services. A peer group may be viewed as an abstract region of the network, and may act as a virtual subnet. The concept of a region virtualizes the notion of routers and firewalls, subdividing the network in a self-organizing fashion without respect to actual physical network boundaries. In one embodiment, peer groups implicitly define a region scope that may limit peer propagation requests. Conceptually, a peer group may be viewed as a virtual entity that speaks the set of peer group protocols.

[0372] The core layer 120 provides core support for peer-to-peer services and applications. In a multi-platform, secure execution environment, the core mechanisms of peer groups, peer pipes and peer monitoring may be provided. Peer groups 122 may establish a set of peers and naming within a peer group with mechanisms to create policies for creation and deletion, membership, advertising and discovery of other peer groups and peer nodes, communication, security, and content sharing. Pipes provide virtual communication channels among peers. Messages sent in pipes may support transfer of data, content, and code in a protocol-independent manner, allowing a range of security, integrity, and privacy options. In one embodiment, messages may be structured with a markup language such as XML. Peer monitoring 128 enables control of the behavior and activity of peers in a peer group and can be used to implement peer management functions including access control, priority setting, traffic metering, and bandwidth balancing.

[0373] The core layer 120 may include protocols and building blocks to enable key mechanisms for peer to peer networking, including discovery, transport (including firewall handling and limited security), and the creation of peers and peer groups. In one embodiment, the core layer 120 may be thin and small, and may provide interesting and powerful primitives for use by services and applications in the other layers. The core layer 120 may support choices such as anonymous vs. registered users and encrypted vs. clear text content without imposing specific policies on developers. Policy choices may be made, or when necessary, implemented, at the service layer 140 and/or application layer 150. For example, administration services such as accepting or rejecting a peer's membership in a peer group may be implemented using the functionality provided by the core layer 120.

[0374] The core components of the peer-to-peer protocol may be used to implement discovery mechanisms for searching, publishing and recovering of core abstractions (e.g. peers, peer group, pipes, endpoints, and advertisements). In one embodiment, these mechanisms may be simple, administration free, and may not require special peers to act as “master” peers. These mechanisms may allow processes in the peer-to-peer network, in absence of help from other applications and/or services, to bootstrap and find out the information necessary to access applications and services that can help. In addition, the core may “return” to this standalone behavior and still function if helper applications or services fail. In one embodiment, safety mechanisms may be put in place in order to avoid a major overflow of “web-crawling.” In one embodiment, applications and/or services that support the peer-to-peer protocol may access, control, and/or override the core components, even to the extreme of implementing a centralized, client-server model based on the core components.

[0375] At the highest abstraction level, the peer-to-peer platform may be viewed as a set of protocols provided at the core layer 120. In one embodiment, a common thread among peer-to-peer platform peers is protocols, not APIs or software implementations. In one embodiment, the peer-to-peer platform protocols may guarantee interoperability between compliant software components executing on potentially heterogeneous peer runtimes. Thus, embodiments of the peer-to-peer platform may be agnostic to programming languages. The term compliant may refer to a single protocol only. That is some peers may not implement all the core protocols. Furthermore, some peers may only use a portion (client-side or server-side only) of a protocol.

[0376] Each protocol may be defined by one or more messages exchanged among participants of the protocol. Each message may have a predefined format, and may include various data fields. In one embodiment, the protocols may utilize messaging such as XML messages. The peer-to-peer platform connects peer nodes with each other. In one embodiment, the peer-to-peer platform may be platform-independent by virtue of being a set of protocols. As such, the peer-to-peer platform may not require APIs and remains independent of programming languages, so that it can be implemented in C/C++, Java, Java 2ME, Perl, Python or other languages. This means heterogeneous devices with completely different software stacks can preferably interoperate through the peer-to-peer platform protocols. To underpin this set of protocols, the peer-to-peer platform may define a number of concepts including peer, peer group, advertisement, message, pipe, and more.

[0377] In one embodiment, peer-to-peer protocols may be embodied as markup language (e.g. XML) messages that may be sent between two peers. In one embodiment, the peer-to-peer platform messages may define the protocols used to discover and connect peers and peer groups, and to access resources offered by peers and peer groups, among others. The use of markup language (e.g. XML) messages to define protocols may allow many different kinds of peers to participate in a protocol. Each peer may be free to implement the protocol in a manner best suited to its abilities and role. For example, not all peers are capable of supporting a Java runtime environment. In one embodiment, the protocol definition does not require nor imply the use of Java on a peer.

[0378] Several peer-to-peer platform protocols that may be provided by embodiments of the peer-to-peer platform are described later in this document. The protocols defined in this document may be realized over networks including, but not limited to, the Internet, a corporate intranet, a dynamic proximity network, a home networking environment, LANs, and WANs. The protocols defined in this document may also be realized within a single computer. Thus, in one embodiment, the peer-to-peer platform may be transport protocol independent. The size and complexity of the network peers that may support these protocols preferably includes a wide range of peer implementations including peers implemented on, but not limited to, simple light switches, PDAs, cell phones, pagers, laptop and notebook computers, smart appliances, personal computers, workstations, complex, highly-available servers, mainframe computers and even supercomputers.

[0379] The peer-to-peer platform may further include a peer-to-peer services layer 140. This layer may provide capabilities that may not be absolutely necessary for a peer-to-peer network to operate but that may be desirable to provided added functionality beyond the core layer 120 in the peer-to-peer environment. The service layer 140 may deal with higher-level concepts such as search and indexing, directory, storage systems, file sharing, distributed file systems, resource aggregation and renting, protocol translation, authentication and PKI (public key infrastructure) systems. These services, which may make use of the protocols and building blocks provided by the core layer 120, may be useful by themselves but also may be included as components in an overall peer-to-peer system. Thus, services may include one or more services 144 provided by the peer-to-peer platform. These platform-provided services 144 may include indexing, searching and file sharing services, for example. The services layer 140 may provide hooks for supporting generic services (such as searching, sharing and added security) that are used in many peer-to-peer applications. Thus, services may also include one or more services 142 not provided as part of the peer-to-peer platform but rather provided by the peer-to-peer platform community. These services 142 may be user-defined and may be provided, for example, to member peers in a peer group as a peer group service.

[0380] Services may expand upon the capabilities of the core layer 120 and may be used to facilitate application development. Facilities provided as services in the service layer 140 may include mechanisms for search and indexing, directory, storage systems, file sharing, distributed file systems, resource aggregation and renting, protocol translation, authentication, PKI services, and caching code and content to enable cross-application bridging and translation of files, among others. Searching capabilities may include distributed, parallel searches across peer groups that are facilitated by matching an XML representation of a query to be processed with representations of the responses that can be provided by each peer. These facilities may be used for simple searches, for example searching a peer's repository, or more complex searches of dynamically generated content that is unreachable by conventional search engines peer-to-peer searches may be conducted across a company's intranet, for example, to quickly locate relevant information within a secure environment. By exercising tight control over peer group membership and enabling encrypted communication between peers, a company may extend this capability to its extranet, including business partners, consultants, and suppliers as peers. The same mechanisms that facilitate searches across the peer group may be used as a bridge to incorporate Internet search results, and to include data outside of the peer's own repository, for example searching a peer's disk. The peer services layer 140 may be used to support other custom, application-specific functions. For example, a secure peer messaging system may be built to allow anonymous authorship and a persistent message store. The peer services layer 140 provides the mechanisms to create such secure tools; the application developers themselves may determine specific tool policies.

[0381] The peer-to-peer platform may also include a peer-to-peer application layer 150. The application layer 140 may support the implementation of integrated applications such as file sharing, resource sharing, monetary systems, distributed storage, peer-to-peer instant messaging, entertainment, content management and delivery, peer-to-peer email systems, distributed auction systems, among others. Applications may be “vertical” or they may be developed to interoperate with other distributed applications. One or more applications 154 may be provided as part of the peer-to-peer platform. For example, one embodiment of the peer-to-peer platform may include a shell application 160 as a development environment built on top of the platform. The shell application may provide interactive access to the peer-to-peer platform via a simple command line interface 162.

[0382] Applications may also include community applications 152 not provided by the peer-to-peer platform. These community applications 152 may be user-defined and may be provided, for example, to member peers in a peer group as a peer group application.

[0383] In one embodiment, the boundary between services and applications is not rigid. An application to one customer can be viewed as a service to another customer. An application may use services. Services may serve as protocols that may be shared among various applications. An application may provide a user interface, a way to define a set of files to share, a way to initiate a search, a way to display the results, and a way to initiate a file transfer, for example. Such an application may make use of a set of services, for example a reliable point-to-point file transfer service, a distributed search service, a discovery service to locate other peers, among others.

[0384] Applications may be built using peer services as well as the core layer 120. The peer-to-peer platform may support the fundamental levels broadly, and rely on the peer-to-peer development community to provide additional peer services and applications. Peer applications enabled by both the core layer 120 and peer services layer 140 may include peer-to-peer auctions that link buyers and sellers directly, with buyers able to program their bidding strategies using a simple scripting language, for example. Resource-sharing applications, such as SETI@home, may be built more quickly and easily, with heterogeneous, worldwide peer groups supported from day one. Instant messaging, mail, and calendaring services may facilitate communication and collaboration within peer groups that are secure and independent of service provider-hosted facilities. Virtually any other type of application may be build on top of the core layer 120 and services layer 140.

[0385] Some features, such as security, may manifest in all three layers and throughout a peer-to-peer system, albeit in different forms according to the location in the software architecture. In one embodiment, the system may be modular, and allows developers to pick and choose a collection of services and applications that suits their needs.

[0386] A typical peer-to-peer platform network may provide an inherently nondeterministic topology/response structure. In a peer-to-peer platform network, a specific resource request may not return for minutes, hours, or even days; in fact, it may never return at all. In addition, people from different parts of the world requesting the same resource are likely to get different copies of the resource from completely different locations. Peers may obtain content from multiple servers, ideally reaching a nearby one that is up and running. The original source peer need not service every resource request; in fact, it does not even have to be up and running. The nondeterministic structure may also help provide the optimized use of network bandwidth. The concentrated localized traffic congestion typical of today's Web does not affect peer-to-peer networking. The nondeterministic structure may also help provide a lowered cost of content distribution. The peer-to-peer network can absorb contents and replicate it for easy access. The nondeterministic structure may also help provide leveraged computing power from every node in the network. With asynchronous operations, a user may issue many requests for many resources or services simultaneously and have the network do the work. The nondeterministic structure may also help provide unlimited scalability. A properly designed peer-to-peer application may span the entire known connected universe without hitting scalability limits; this is typically not possible with centralized schemes. Note, however, that the peer-to-peer platform also may support deterministic, synchronous applications.

[0387] As an example of a nondeterministic, asynchronous application, consider a network-based music request service that operates over a peer-to-peer platform-based peer-to-peer network. A peer submits multiple requests for music files and then checks back later to see if the music request service in the peer group has found them. A few requested files have been found, but others cannot be located. The service's response in regards to the files that cannot be located may be something like “Music selection and availability changes continuously; please retry your request later.” This is an acceptable nondeterministic outcome. Even though the service could not find a file, the same file may be available later if the same request is resubmitted, because peers that host the desired files may have come online in the meantime.

[0388] The peer-to-peer platform provides the ability to replicate information toward end users. Popular content tends to be replicated more often, making it easier to find as more copies are available. Peers do not have to always go back to the same peer to obtain the information they want, as is typical in the client/server model. Peers may obtain information from neighboring peers that have already cached the information. Each peer may become a provider to all other peers.

[0389] In one embodiment, the peer-to-peer platform may enable peers to find content that is closest to them. This content may include data (e.g. files) or even services and applications. For example, if a peer node in an office peer-to-peer network using the peer-to-peer platform is moved, the peer-to-peer platform may allow the peer to automatically locate content (e.g. using a discovery service that participates in the discovery protocol) including services (e.g. a printer service and an email service) hosted by other peers closest to the peer's new location, without requiring any manual reconfiguration. Further, at least some content may be copied or moved to the peer in its new location and/or to other peers proximate to the new location.

[0390] In one embodiment, the peer-to-peer platform may provide a decentralized environment that minimizes single points of failure and is not dependent on any centralized services. Both centralized and decentralized services may be developed on top of the peer-to-peer platform. With the addition of each new network peer, the network platform preferably becomes more robust as it expands. In the environment, services may be implemented to interoperate with other services giving rise to new peer-to-peer applications. For example, a peer-to-peer communications service like instant messaging may easily be added to a resource-sharing peer-to-peer application if both support at least the necessary peer-to-peer platform protocols.

[0391] The peer-to-peer platform may provide interoperability. The peer-to-peer platform may be used by developers independent of preferred programming languages, development environments, or deployment platforms. Embodiments of the peer-to-peer platform may enable interconnected peers to easily locate each other, communicate with each other, participate in community-based activities, and offer services to each other seamlessly across different peer-to-peer systems and different communities. The peer-to-peer platform may also provide platform independence. Embodiments of the peer-to-peer platform may be independent of programming languages (such as C/C++, Java, Perl, and KVM), system platforms (such as the Microsoft Windows, UNIX®, Solaris, Linux and Macintosh platforms), and networking platforms (such as TCP/IP, Bluetooth and Havi). Thus, heterogeneous devices with completely different software stacks may interoperate through the peer-to-peer platform protocols. Embodiments of the peer-to-peer platform may be implementable on any device with a digital heartbeat, including, but not limited to, sensors, consumer electronics, Personal Digital Assistants (PDAs), appliances, network routers, desktop computers, data-center servers, and storage systems. Embodiments of the peer-to-peer platform may enable peers, independent of software and hardware platform, to benefit and profit from being connected to millions of other peers.

[0392] In one embodiment, the peer-to-peer platform may run on any of various operating systems including embedded operating systems (with the appropriate level of Java runtime support, if required) such as Windows95, 98, 2000, ME, and NT, Solaris, Unix, Macintosh, Linux, Java 2 Platform, Micro Edition (J2ME) and PersonalJava Technology. The peer-to-peer platform may be implemented in any of a variety of development environments using any of a variety of programming languages, or combinations of programming languages, including, but not limited to, Java, Java 2ME, C/C++, Perl, Python and KVM. In one embodiment, the peer-to-peer platform may be implemented in Java. In one embodiment, a peer-to-peer platform may be implemented in C/C++ on some devices, for example, to support devices without Java support. In one embodiment, a peer-to-peer platform may be implemented in KVM on some devices, for example, so that all KVM capable devices such as PDAs and cell phones can be peer-to-peer platform peers. Programming languages other than those listed may also be used in various embodiments.

[0393] A minimal device with the ability to generate a text string may theoretically participate in a peer-to-peer platform network (though not necessarily in every peer-to-peer application). The simplistic device may need a surrogate peer on the peer-to-peer network. This surrogate peer may perform discovery, advertisement, and communications on behalf of the simplistic device (or many simplistic devices). The location of the surrogate may be hard-wired into the simplistic device. In this way, the simplistic device with the help of the surrogate can be a full-fledged peer on the peer-to-peer platform network. For example, a GPS locator, strapped to a sea turtle and sending out peer-to-peer platform messages wirelessly with location information, may become a peer on a peer-to-peer platform network.

[0394] Embodiments of the peer-to-peer platform may be independent of transport protocols. For example, the peer-to-peer platform may be implemented on top of TCP/IP, HTTP, Bluetooth, HomePNA, and other protocols. Thus, a system built on top of the peer-to-peer platform preferably functions in the same or similar fashion when the system is expanded to a new networking environment or to a new class of devices, as long as there is a correct transport protocol handler for the new networking protocol.

[0395] In one embodiment, the peer-to-peer platform may use XML as the encoding format. XML may provide convenience in parsing and extensibility. Other embodiments of the peer-to-peer platform may use other encoding formats. The use of XML does not imply that all peer-to-peer platform peer nodes must be able to parse and to create XML documents. For example, a cell phone with limited resources may be programmed to recognize and to create certain canned XML messages and can still participate in a peer-to-peer platform network of peers. In one embodiment, a lightweight XML parser may be used that supports a subset of XML. This may help reduce the size of the peer-to-peer platform.

[0396] There may be areas in a peer-to-peer environment where there is not one correct way to do something or where what should be done depends on the nature and context of the overriding application. For example, in the area of security, every peer-to-peer application may choose a different authentication scheme, a different way to ensure communication security, a different encryption algorithm for data security, a different signature scheme for authenticity, and a different access control policy. Therefore, for these areas, the peer-to-peer platform may preferably focus on mechanisms instead of policy, so that application developers can have the maximum freedom to innovate and offer competitive solutions.

[0397] Implementations of the peer-to-peer platform may be illustrated with a few application or usage scenarios. For example, assume there is a peer-to-peer community offering a search capability for its members, where one member can post a query and other members can hear and respond to the query. One member is a Napster user and has implemented a feature so that, whenever a query is received seeking an MP3 file, this member will look up the Napster directory and then respond to the query with information returned by the Napster system. Here, a member without any knowledge of Napster may benefit because another member implemented a bridge to connect their peer-to-peer system to Napster. The peer-to-peer platform may provide a platform bridge that may be used to connect the various peer-to-peer systems together.

[0398] In another example, one engineering group requires a sizable storage capability, but also with redundancy to protect data from sudden loss. Using the peer-to-peer platform, each group may buy a simple storage system without a mirroring feature, where the disks can then discover each other automatically, form a storage peer group, and offer mirroring facilities using their spare capacity.

[0399] As yet another example, many devices such as cell phones, pagers, wireless email devices, Personal Digital Assistants (PDAs), and Personal Computers (PCs) may carry directory and calendar information. Using the peer-to-peer platform, these devices may be able to interact with each other, without extra networking interfaces except those needed by the devices themselves, using the peer-to-peer platform as the common layer of communication and data exchange.

[0400] Peer-to-Peer Platform Identifiers

[0401] In embodiments the peer-to-peer platform, peer-to-peer platform protocols may need to refer to peers, peer groups, pipes and other peer-to-peer platform resources. In one embodiment, these references may be presented in the protocols as peer-to-peer platform identifiers. Peer-to-peer platform identifiers may provide a mechanism for uniquely identifying specific peer groups, peers, pipes, contents and service instances, among other resources. Peer-to-peer platform identifiers may provide unambiguous references to the various peer-to-peer platform entities. There may be several types of peer-to-peer platform entities which may have peer-to-peer platform identifier types defined including one or more of, but not limited to: peer groups, peers, pipes, content, module classes and module specifications.

[0402] In one embodiment, peer-to-peer platform identifiers may be presented as Uniform -Resource Names (URNs). URNs are a form of URI (Uniform Resource Identifier) that are intended to serve as persistent, location-independent, resource identifiers. Like other forms of URI, peer-to-peer platform identifiers are presented as text. Refer to IETF RFC 2141 for more information on URNs.

[0403] In one embodiment, a peer-to-peer platform identifier is a standard URN in the peer-to-peer platform identifier namespace. Peer-to-peer platform identifier URNs may be identified by a namespace identifier, for example “xxxx.” Each peer-to-peer platform identifier URN may also include an identifier format keyword. The identifier format keyword may indicate how the identifier was created and may allow peer-to-peer platform bindings to extract additional information from the identifier. In one embodiment, peer-to-peer platform identifier formats may be defined to refer to resources both within peer-to-peer platform and to bridge to other technologies. One embodiment may use the ABNF syntax as defined in “IETF RFC 2234” as a format specification.

[0404] When peer-to-peer platform identifiers are used within peer-to-peer platform protocols, the identifiers may be manipulated as text string URIs. Operations available for URIs may include compare, resolve, and decompose. Peer-to-peer platform identifier URIs may be compared for equality as strings. Peer-to-peer platform identifier URIs may also be resolved to the resource they reference. Peer-to-peer platform identifier URIs may be decomposed and interpreted by peer-to-peer platform bindings. To interpret a peer-to-peer platform identifier, a peer-to-peer platform binding may support the identifier format used by that peer-to-peer platform identifier. For many peer-to-peer platform protocols and operations, it may not be necessary to decompose the peer-to-peer platform identifiers.

[0405] In one embodiment, peer group identifiers may be used to refer to peer groups. In one embodiment, a peer group identifier may canonically, uniquely and unambiguously refer to a peer group. In one embodiment, other identifier formats may support this identifier type because the other identifier types may refer to the peer group to which they belong.

[0406] In one embodiment, peer identifiers may be used to refer to peers. In one embodiment, a peer identifier may canonically, uniquely and unambiguously refer to a peer. If a peer-to-peer platform binding recognizes the identifier format, it may be able to extract a peer group identifier from a peer identifier. This peer group identifier identifies the peer group of which the peer is a member.

[0407] In one embodiment, codat identifiers may be used to refer to codats. A codat identifier may canonically, uniquely and unambiguously refer to a codat. In one embodiment, support for codat identifiers may be optional. In one embodiment, if a peer-to-peer platform binding recognizes the codat identifier format, it should be able to extract a peer group identifier from a given codat identifier. This peer group identifier identifies the peer group to which the codat belongs.

[0408] The term “codat” as used herein refers to any computer content—code, data, applications, or other collection of computer representable resources. In one embodiment, the peer-to-peer protocol may not distinguish among different types of resources that can be stored on a computer and shared among peers in a peer group. Examples of codat include text files, photographs, applets, executable files, serialized Java objects, SOAP messages, etc. Codats are the elementary unit of information that is exchanged among peers. In this embodiment, given that codats may have arbitrary forms and properties, it may not be clear what sets of actions should be defined for them. In one embodiment, the codats may carry or include definitions of how they should be accessed. Such codats are analogous to objects, which may define for themselves access methods others can invoke.

[0409] In one embodiment, pipe identifiers may be used to refer to pipes. A pipe identifier may canonically, uniquely and unambiguously refer to a pipe. In one embodiment, support for pipe identifiers may be optional. In one embodiment, if a peer-to-peer platform binding recognizes the pipe identifier format, it should be able to extract a peer group identifier from a given pipe identifier. This peer group identifier identifies the peer group to which the pipe belongs.

[0410] In one embodiment, a module class identifier may identify a particular local behavior; for example, a specific API for each execution environment for which an implementation of the module exists. A module class identifier may canonically, uniquely and unambiguously refer to a module class as defined by an advertisement. If a peer-to-peer platform binding recognizes the module class identifier type, it should be able to extract a base class identifier from a module class identifier. The base class identifier allows applications to determine if two module class identifiers differ only in the “role” they perform. In one embodiment, a module specification identifier's “roles” may allow the same module to be reused within a group and to have instances distinguished. This may be necessary when, for example, a common database service is used, with each role accessing a different data set.

[0411] In one embodiment, a module specification identifier may uniquely identify a particular network behavior (e.g. wire protocol and choreography) that may be embodied by a software module. In one embodiment, there may be any number of implementations of a given module specification identifier. A module specification identifier may uniquely identify an abstract module for which there may be multiple platform-specific implementations. A module specification identifier may be used to locate a compatible implementation so that it can be instantiated. In one embodiment, all such implementations are assumed to be network compatible. A module specification identifier may canonically, uniquely and unambiguously refer to a module specification. If a peer-to-peer platform binding recognizes this identifier type, it should be able to extract a Module class identifier from a Module specification identifier. In one embodiment, each peer-to-peer platform identifier types may have a specific definition for how its fields are represented within its structure.

[0412] In one embodiment, for peer-to-peer platform module class identifiers, each module may be assigned a module service identifier that may enable canonical references to be made to the service in the context of a specific peer group, and optionally within the context of a specific peer. In one embodiment, for peer-to-peer platform module specification identifiers, each service may be assigned a unique service identifier that may enable canonical references to be made to the service in the context of a specific peer group, and optionally within the context of a specific peer.

[0413] One embodiment of the peer-to-peer platform may define an identifier format that may be used for encoding peer-to-peer platform identifiers. Peer-to-peer platform binding implementations preferably support this identifier format. In one embodiment, there may be one or more reserved peer-to-peer platform identifiers, including, but not limited to, the null identifier, the world peer group identifier, and the net peer group identifier.

[0414] UUIDs

[0415] A peer group may theoretically be as large as the entire connected universe. Naming anything uniquely is a challenge in such a large namespace. In one embodiment, the peer-to-peer platform may support and/or provide sophisticated naming and binding services. In one embodiment, the peer-to-peer platform may use a universal unique identifier (UUID), for example, a 64- or 128-bit datum, to refer to an entity or resource (e.g. a peer, peer group, service, application, pipe, advertisement, endpoint, content, etc.). For example, UUIDs may be embedded in advertisements for internal use.

[0416] UUIDs provide unique identifiers for resources in the peer-to-peer environment, and, in one embodiment, may identify the resource independently of the resource's location on the network. A UUID may be bound to other information, such as a network address of the corresponding resource and/or a resource name of the resource. Thus, UUIDs help to provide peers, services and other peer-to-peer environment entities with access to resources in the peer-to-peer environment independent of the resources' locations.

[0417] In one embodiment, UUIDs may be used to guarantee that each resource or entity has a unique UUID within a local runtime environment and serves as a canonical way of referring to an entity, but because a global state is not assumed, it may not be possible to provide a guarantee of uniqueness across an entire community that may consist of millions of peers. This may not be a problem because a UUID may be used within the peer-to-peer platform as an internal identifier. This may become significant only after the UUID is securely bound to other information such as a name and a network address.

[0418] The UUID is an abstract data structure, and thus virtually any canonical method may be used for representing UUIDs for use in peer-to-peer environments. In one embodiment, different peer groups may implement different canonical representations of UUIDs in the same peer-to-peer environment. In one embodiment, Uniform Resource Name (URN) format may be used for the representation of UUIDs. In one embodiment, Uniform Resource Identifier (URI) format may be used. In one embodiment, Uniform Resource Locator (URL) format may be used. In one embodiment, custom and/or proprietary methods of representing UUIDs may be used. For example, one peer group may use URN format for UUIDs, and another peer group may use a proprietary alphanumeric naming scheme.

[0419] In one embodiment, the UUIDs may be used in providing flexible configuration and seamless relocation of peer nodes on a peer-to-peer network, and may assist in locating and accessing content including services nearest to a peer node when the peer node is moved. For example, a businessperson based in New York may participate in a peer-to-peer network based on the peer-to-peer protocols using a notebook computer or other portable computing device connected to a LAN as a peer node. The businessperson may access an instance of an email and/or other services locally hosted by other peer-nodes in a peer group on the LAN. If the businessperson travels to Paris, for example, and takes the notebook computer, the notebook computer may be connected to a different LAN at the Paris location and participate in the peer-to-peer network. Because the peer node has a unique identifier in the peer-to-peer network (e.g. a UUID) rather than just a static network address (the unique identifier may be bound to the static network address), the peer node may seamlessly access instances of an email service and other services locally hosted on the LAN, or alternatively hosted on a peer node at the peer node's original location or elsewhere, using the UUID to establish its identity. The peer node may rejoin the peer group in New York to access one or more instances of services and other content hosted on the peer group, and may also join a peer group at the Paris location to access one or more other instances of services and content.

[0420] Thus, the peer-to-peer protocols and UUIDs may provide the ability for peer nodes to move to different peer groups and/or peer regions and access services and other content independent of network addresses and without requiring reconfiguration of the peer node. For example, when the exemplary peer node moves to Paris, connects to the network (at a different network address) and accesses an instance of an email service (either locally or remotely hosted, for example in the New York peer group), the email service may identify the peer node by its unique identifier and route the peer's email to the peer node at the new network address without requiring reconfiguration of the peer node. Thus, peer nodes may be relocated and access services and other content that are locally hosted or services and other content hosted in their original peer group if the services and other content are not required to be locally hosted.

[0421] Peers

[0422] Network nodes (peers) of various kinds may join the peer-to-peer networking platform by implementing one or more of the platform's protocols. A peer may be any networked device (e.g. sensor, phone, PDA, PC, server, supercomputer, etc.) that implements one or more of the core peer-to-peer platform protocols. Each peer operates independently and asynchronously of any other peer, providing a degree of reliability and scalability not typically found in current distributed systems. Some peers may have more dependencies with other peers due to special relationships (e.g. gateways or routers). In one embodiment, a peer does not need to understand all of the protocols of the peer-to-peer platform. The peer can still perform at a reduced level if it does not support one or more of the protocols.

[0423] Peers may publish and provide network resources (e.g. CPU, storage and routing resources) that may be used by other peers. Peers may provide network services that may be used by other peers. Peers typically interact with a small number of other peers (network neighbors or buddy peers). Peers that provide the same set of services tend to be inter-changeable. Thus, it may not matter which peers a peer interacts with. Generally, assumptions should not be made about peer reliability or connectivity, as a peer may appear or leave the network at any time. Peers may have persistent storage. A peer may optionally cache information.

[0424] Peers may have multiple network interfaces. In one embodiment, a peer may not need to publish all of its interfaces for use with the peer-to-peer protocols. Each published interface may be advertised as a peer endpoint. In one embodiment, a peer endpoint is an identifier (e.g. a URN or URI) that uniquely identifies a peer network interface. Peer endpoints may be used by peers to establish direct point-to-point connections between peers. Peers may not have direct point-to-point network connection between themselves, either due to lack of physical network connections, or network configuration (NATs, firewalls, proxies, etc.), and thus a peer may have to use one or more intermediary peers to route a message from an endpoint to another peer endpoint.

[0425] The term rendezvous peer may be used to designate a peer that is designated to be a rendezvous point for discovering information about other peers, peer groups, services and pipes. In one embodiment, rendezvous peers may cache information that may be useful to peers including new peers. Rendezvous peers may provide an efficient mechanism for peers that are far away to find (e.g. discover) each other. Rendezvous peers may make peer discovery more practical and efficient. In one embodiment, a peer group is not required to have a rendezvous peer. In one embodiment, any or even all members of a peer group may become rendezvous peers in a peer group. In one embodiment, each peer group may have different policies to authorize a peer to become a rendezvous peer.

[0426] The term router peer may be used to describe a peer that crosses one or more regions and is designated to be a router between the regions. Router peers may be used to route messages between different network protocols (e.g. TCP/IP, IrDA) or to peers that are behind firewalls. In one embodiment, any or all peer members may become routers. In one embodiment, peer groups may have different policies to authorize a peer to become a router peer for other peers.

[0427] In one embodiment, every peer in the peer-to-peer network may have a unique peer identifier (e.g. UUID). Other peer-to-peer network resources may also have unique identifiers, including peer groups, services, applications, pipes, endpoints, content and resource advertisements. In one embodiment, the peer identifier may identify a peer group in which the peer is a member peer. In one embodiment, a peer may have a different peer identifier for each group in which it is a member peer. A peer identifier that also identifies a peer group in which the peer is a member peer may be used to differentiate peers that seek access to a service or content on a peer within the peer group. For example, a peer may provide implementations of a service in two or more different peer groups in which it is a member peer. The peer may advertise a different peer identifier within each peer group, and may differentiate between messages received from peers in the different peer groups by examining their respective peer identifiers to identify the particular peer group in which the peers that sent the messages are member peers to determine which service implementation to provide to the requesting peers.

[0428] Peers may be identified by their unique identifier (UUID) rather than by a fixed address. When a peer boots, it attempts to contact other peers. In one embodiment, contacted peers may include variable-sized caches that map nearby peers' UUID to their current addresses. This allows embodiments of the peer-to-peer platform to be run over a dialup connection, for example.

[0429] The peer identifiers may be included in resource advertisements of resources associated with the peers. For example, the peer identifiers may be included in peer advertisements, peer group advertisements, service advertisements, pipe advertisements and endpoint advertisements, among others. In one embodiment, a peer identifier may be bound to a network address (e.g. IP address, URI, URN or URL) of the peer. If the peer changes network addresses (e.g. is moved to a new network location), the peer identifier may be unbound from the network address and bound to the new network address. Thus, the peer identifier provides a dynamic identification and addressing mechanism for peers in the peer-to-peer network, rather than a static mechanism, allowing peers to change network locations and still be identifiable (e.g. in peer groups the peer is a member peer of) using the same peer identifier.

[0430] In one embodiment, the peer identifier may include information identifying a particular peer group the peer is a member peer of. In one embodiment, a peer may be assigned a different, unique peer identifier for each peer group the peer is a member peer of. In one embodiment, peer identifiers may be included in messages received from other peers. If the receiving peer is a member in more than one peer group, the receiving peer may use the peer identifiers received in the messages to identify particular implementations of resources (e.g. services, pipes, endpoints and content) that are available for access by the sending peers.

[0431] The resource identifiers may be included in resource advertisements for the resources. At least a portion of the resource identifiers may be bound to a network address (e.g. IP address, URI, URN or URL) corresponding to the resource. At least a portion of the resource identifiers may also specify a particular peer and/or peer group that hosts the resource. Resources may include, but are not limited to, peers, peer groups, services, applications, advertisements, content, pipes and pipe endpoints.

[0432] In one embodiment, a peer may be assigned a unique string as a name. Any naming scheme may be used. In one embodiment, names are not unique unless a coordinated naming service is used to guarantee name uniqueness. A naming service is typically a centralized service that guarantees the uniqueness of name and can be used to register name mapping. Examples of naming services are DNS and LDAP. In one embodiment, the use of a naming service may be optional.

[0433] Peer Groups

[0434] Peers may spontaneously discover each other on the network to form transient or persistent relationships called peer groups. Peer groups are collections of peers that may share some common interest or interests. Peer groups may also be statically predefined. In one embodiment, a peer group may provide one or more peer group services. In one embodiment the peer-to-peer platform may defines a core set of peer group services. The peer-to-peer platform protocols may specify the wire format for these core peer group services. Additional peer group services may be developed for delivering specific services. For example, a lookup service could be implemented to find active (running on some peer) and inactive (not yet running) service instances

[0435] Some embodiments of the peer-to-peer platform may describe how to create and discover peer groups, but may not dictate when, where, or why to create a peer group, the type of the group, or the membership of the group. A peer group may provide a common membership definition. Each peer group may establish its own membership policy in a range from open (any peer can join) up to highly secure and protected (a peer may join only if it possesses sufficient credentials).

[0436] In one embodiment, peers wishing to join a peer group may first locate a current member, and then request to join the peer group. The peer-to-peer platform may define how to discover peer groups, e.g. using a peer discovery protocol. The application to join may be rejected or accepted by the collective set of current members in accordance with the peer group's membership policy. In one embodiment, a peer group core membership service may be used to enforce a vote among one or more group members. Alternatively, one or more group representative member peers may be elected or appointed to accept or reject new membership applications.

[0437] In one embodiment, the peer-to-peer platform is not concerned with what sequence of events a peer or a peer group comes into existence. Moreover, in one embodiment, the peer-to-peer platform does not limit how many groups a peer can belong to. In one embodiment, nested and/or overlapping peer groups may be formed. In one embodiment, there may be a special group, called the World Peer Group, which may include all peer-to-peer platform peers. In one embodiment, the world peer group may provide the minimum seed for every peer to potentially find each other and form new groups. In one embodiment, the world peer group has an open membership policy (e.g. has a null membership authenticator service). Some peers inside the world peer group may not be able to discover or communicate with each other—e.g., they may be separated by a network partition. In one embodiment, participation in the World Peer Group is by default.

[0438] The peer-to-peer platform may use the concept of a peer group as an implicit scope of all messages originated from within the group. Peer groups may serve to subdivide the network into abstract regions providing an implicit scoping mechanism. Peer groups may provide a limited scoping environment to ensure scalability. Peer groups may be formed and self organized based upon the mutual interest of peers. In one embodiment, no particular rules are imposed on the way peer groups are formed, but peers with the same interests may tend to join the same peer groups.

[0439] In one embodiment, a scope may be realized with the formation of a corresponding peer group. Peer group boundaries may define the search scope when searching for a group's content. For example, a peer in San Francisco looking to buy a used car is normally not interested in cars available outside of the Bay Area. In this case, the peer may want to multicast a message to a subset of the current worldwide peer group, and a subgroup may be formed especially for this purpose. In one embodiment, the multicast may be done without the formation of a new peer group. In one embodiment, all messages may carry a special scope field, which may indicate the scope for which the message is intended. Any peer who receives this message may propagate the message based on the scope indicator. In one embodiment, using this approach, a sending peer may be bootstrapped with some well-defined scopes, and may have the ability to discover additional scopes.

[0440] Peer groups may also be formed based upon the proximity of the member peers. Proximity-based peer groups may serve to subdivide the network into abstract regions. Regions may serve as a placeholder for general communication and security configurations that deal with existing networking infrastructure, communication scopes and security requirements. Peer groups may provide a scoping mechanism to reduce traffic overload.

[0441] Peer groups may provide a secure cooperative environment. Peer group boundaries permit member peers to access and publish protected contents. Peer groups form virtual secure regions which boundaries limit access to the peer group resources. Secure services may be provided to peers within a secured peer group. Their-boundaries may or may not reflect any underlying physical network boundaries such as those imposed by routers and firewalls. The concept of a region may virtualize the notion of routers and firewalls, subdividing the network into secure regions in a self-organizing fashion without respect to actual physical network boundaries.

[0442] Peer groups may also create a monitoring environment. Peer groups may permit peers to monitor a set of peers for any special purpose (heartbeat, traffic introspection, accountability, etc.). Peer groups may also provide a controlled and self-administered environment. Peer groups may provide a self-organized structure that is self-managed and that may be locally managed.

[0443] In one embodiment, peer groups using the peer-to-peer platform may provide capabilities to peers including one or more of, but not limited to, finding nearby peers, finding named peers anywhere on the network, finding named peer groups anywhere on the network, joining and resigning from a peer group, establishing pipes between peer group members, and finding and exchanging shared content.

[0444] Content

[0445] Peers may be grouped into peer groups to share content. A content is published and shared among the peer members of a peer group. In one embodiment, content may be shared among group members, but not between groups. In this embodiment, no single item of content may belong to more than one group. If the same content is published in two different peer groups, two different contents may be created. In one embodiment, a content item may be published to make the item's existence known and available to group members using advertisements.

[0446] An instance of content is a copy of a content. Each content copy may be replicated on different peers in the peer group. In one embodiment, each copy may have the same content identifier as well as a similar value. Replicating contents within a peer group may help any single item of content be more available. For example, if an item has two instances residing on two different peers, only one of the peers needs to be alive and respond to the content request. In one embodiment, the peer-to-peer platform protocols do not specify how or when contents are replicated. In one embodiment, whether and how to copy an item of content may be a policy decision that may be encapsulated in higher-level applications and services, for example a content management service.

[0447] A content may be any computer content (e.g. code, data, applications, active content such as services, or other collection of computer-representable resources). Examples of content include, but are not limited to, a text file, a structured document (e.g. a PDF or a XML file), a Java “.jar” or loadable library, code or even an executable process (checkpointed state). No size limitation is assumed. Each content instance may reside on a different peer in the peer group. The instances may differ in their encoding type. HTML, XML and WML are examples of encoding types. Each instance may have the same content identifier as well as a similar set of elements and attributes, and may even exist on the same peer. An encoding metadata element may be used to differentiate instances of content. Making new instances of content on different peers may help any single item of content be more available. For example, if an item has two instances residing on two different peers, only one of the peers needs to be alive and respond to the content request.

[0448] Items of content that represent a network service may be referred to as active content. These items may have additional core elements beyond the basic elements used for identification and advertisement. In one embodiment, active content items may be recognized by Multi-Purpose Internet Mail Extensions (MIME) content type and subtype. In one embodiment, all peer-to-peer platform active contents may have the same type. In one embodiment, the subtype of an active content may be defined by network service providers and may be used to imply the additional core elements belonging to active content documents. In one embodiment, the peer-to-peer platform may give latitude to service providers in this regard, yielding many service implementation possibilities.

[0449] In one embodiment, each item of content may have a unique canonical name. FIG. 3 illustrates an exemplary canonical content name (which may be referred to as a content identifier or content identifier) according to one embodiment. The unique identifier may include a peer group universal unique identifier (UUID) 170, and may include another name 174 that may be computed, parsed, and maintained by peer group members. In one embodiment, the UUID may be a 128-bit field. In one embodiment, the name may be a byte array. In one embodiment, the particular name implementation within a peer group is not mandated by the peer-to-peer platform. The name may be, for example, a hash code, a URI, a URN, or a name generated by any suitable means of uniquely identifying content within a peer group. In one embodiment, a length of remainder field 172 may specify the length of the name field 174 for this content in this particular implementation.

[0450] In one embodiment, once a content item has been published-to the peer-to-peer network, it may not be assumed that that the content can be later retrieved from the network. The content may be only available from peers that are not currently reachable or not currently part of the network. In one embodiment, once a content item has been published to the peer-to-peer network, it may not be assumed that the content can be deleted. Replication/republication of content by peers on the network may be unrestricted and the content may propagate to peers that are not reachable from the publishing peer.

[0451] Pipes

[0452] Pipes may provide the primary channels for communication among peers and are a mechanism for establishing communication between peers. Pipes may be used as communication channels for sending and receiving messages between services or applications over peer endpoints. Peer endpoints correspond to the available peer network interfaces that can be used to send and receive data from another peer. Pipes may connect peers that have a direct physical link and peers that do not have a direct physical link. In the latter case, one or more intermediary peer endpoints may be used to route messages between the two pipe endpoints. A pipe instance is, logically speaking, a resource within a peer group. The actual implementation of a pipe instance is typically through a pipe service. In one embodiment, at each endpoint, software to send, or receive, as well as to manage optional associated pipe message queues is assumed, but not mandated.

[0453] In one embodiment, pipes are a mechanism for interacting with services on the peer-to-peer network. Rather than assuming a specific naming system such as DNS or a specific network addressing system such as IP, the peer-to-peer platform may abstract these concepts via several mechanisms. Pipes provide a virtual abstraction of the network service using a pipe identifier that is bound to a peer identifier via a pipe advertisement, which in turn is bound to an endpoint address via a peer advertisement and an endpoint advertisement. Pipes can thus be moved from one peer to another providing flexibility in the way a service is deployed and consumed. The location of a machine (node) on the network is abstracted via the concept of the peer that binds to an endpoint. This provides support for dynamic movement of endpoint addresses for a specific peer.

[0454] In one embodiment, pipes are implemented as a service on a peer. In one embodiment, in order for a peer to send a message to another peer's pipe, both peers must be part of the same peer group. This allows groups of peers to potentially implement different kinds of pipes, allowing for a flexible approach to communication.

[0455] In one embodiment, to connect to a pipe, a peer may send a discovery request for a pipe advertisement containing specific keywords. The peer may then receive the requested pipe advertisement. The peer may then send a pipe resolver request for a peer matching the pipe identifier and may then receive the peer advertisement, for example from a pipe service that handles the request. The peer may then send data down the pipe, for example using a URL addressing scheme.

[0456] In one embodiment, pipes in the peer-to-peer platform may be asynchronous, unidirectional, stateless and unreliable to provide the lowest overhead. In one embodiment, pipes may be unidirectional, and thus there may be input pipes and output pipes. Asynchronous pipes may enable developers to build large-scale interconnected distributed services and applications. In one embodiment, pipes may be indiscriminate, and may thus support binary code, data strings, Java technology-based objects, and/or applets, among others. In one embodiment, the peer-to-peer platform may not define how the internals of a pipe work. Any number of unicast and multicast protocols and algorithms, and combinations thereof, may be used. In one embodiment, one pipe may be chained together with each section of the chain using a different transport protocol.

[0457] The pipe endpoints may be referred to as input pipes (receiving end) and output pipes (sending end). Pipes may provide the illusion of a “virtual” in and out mailbox that is independent of any single peer location and network topology (e.g. multi-hops route). Services and applications may communicate through pipes without knowing on which physical peer a pipe endpoint is bound. When a message is sent into a pipe, the message is sent to all peer endpoints currently connected (listening) to the pipe. The set of currently connected pipe endpoints (input pipes) may be obtained using the pipe binding protocol.

[0458] Unlike conventional mechanisms, peer-to-peer platform pipes may have ends that may be moved around and bound to different peers at different times, or not connected at all. In one embodiment, pipes may be virtual, in that a pipe's endpoint may be bound to one or more peer endpoints. In one embodiment, pipe endpoints may be non-localized to a physical peer, and may be dynamically bound at creation time or runtime via the pipe binding protocol. The pipe binding process may include discovering and connecting the two or more endpoints of a pipe.

[0459] Using pipes, developers may build highly available services where pipe connections may be established independently of a peer location. This dynamic binding of pipes helps to provide redundant implementation of services over a peer-to-peer network. A peer may logically “pick up” a pipe at any point in time. For example, a peer that wants to use a spell checker service man connect to a peer group's spell checker pipe that is implemented as a redundant peer group service. The peer may be serviced as long as there is at least one single instance of a spell checker service still running somewhere within the peer group. Thus, using pipes as described herein, a collection of peers together may provide a high level of fault tolerance, where a new peer at a different location may replace a crashed peer, with the new peer taking over the existing pipe to keep the communication going.

[0460] In one embodiment, enhanced pipes with additional properties such as reliability, security, and quality of service may be supported. In embodiments where the peer-to-peer platform runs on top of transports that have such properties, an implementation may optimize and utilize the transports. For example, when two peers communicate with each other and both have TCP/IP support, then an implementation may use the bidirectional capabilities of TCP/IP to create bidirectional pipes. Other data transfer methods that may be implemented by pipes as provided at the service layer to provide different quality of service include, but are not limited to: synchronous request-response (the endpoint sends a message, and receives a correlated answer), streaming (efficient control-flow data transfer), bulk transfer (bulk reliable data transfer of binary data), and secure (secure reliable data streams).

[0461] Pipes may offer several modes of communication. FIG. 4 illustrates a point-to-point pipe connection between peers 200C and 200D according to one embodiment. In one embodiment, a point-to-point pipe connects exactly two peer endpoints together, an input pipe 202A that receives messages sent from an output pipe 204A. The pipe appears as an output pipe to the sender and as an input pipe to the receiver, with traffic going in one direction only—from the sender to the receiver. In one embodiment, no reply or acknowledgement operation is supported. In one embodiment, additional information in the message payload (for example, a unique identifier) may be required to thread message sequences. The message payload may also contain a pipe advertisement that can be used to open a pipe to reply to the sender (send/response).

[0462]FIG. 4 also illustrates a propagate pipe with peer 200A as a propagation source and peers 200B and 200C with listening input pipes according to one embodiment. A propagate pipe may connect two or more peer endpoints together, from one output pipe 204B to one or more input pipes (e.g. 202B and 202C). The result is that any message sent into the output pipe is sent to all input pipes. Messages flow into the input pipes from the output pipe (propagation source). A propagate message may be sent to all listening input pipes. This process may create multiple copies of the message to be sent. On transports that provide multicast (e.g. TCP/IP), when the propagate scope maps to underlying physical subnets in a one-to-one fashion, transport multicast be may used as an implementation for propagate. Propagate may be implemented using point-to-point communication on transports that do not provide multicast such as HTTP.

[0463] Messages

[0464] In one embodiment, the peer-to-peer platform may use asynchronous messages as a basis for providing Internet-scalable peer-to-peer communication. The information transmitted using pipes may be packaged as messages. Messages define an envelope to transfer any kinds of data. A message may contain an arbitrary number of named subsections that may hold any form of data. In one embodiment, the messages may be in a markup language. In one embodiment, the markup language is XML. Each peer's messaging layer may deliver an ordered sequence of bytes from the peer to another peer. The messaging layer may send information as a sequence of bytes in one atomic message unit. In one embodiment, messages may be sent between peer endpoints. In one embodiment, an endpoint may be defined as a logical destination (e.g. embodied as a URN) on any networking transport capable of sending and receiving Datagram-style messages. Endpoints are typically mapped into physical addresses by the messaging layer at runtime.

[0465] In one embodiment, a message is a set of named and typed contents called elements. Thus, a message may be a set of name/value pairs. The content may be of arbitrary types. Core services may send advertisements as message element content.

[0466] As a message passes down a protocol stack (applications, services, endpoint and transports), each level may add one or more named elements to the message. As a message is passed back up the stack on the receiving peer, the protocol handlers may remove those elements. In one embodiment, a message is an ordered sequence of message elements. In one embodiment, the most recently added element appears at the end of the message.

[0467] In one embodiment, a message element may include one or more of, but is not limited to, a namespace, a name (which may be optional), a type (which may be optional), a signature or digest (which may be optional), and content. In one embodiment, every message element may be assigned to a namespace. Namespaces may be used to organize elements used by different message users and transports within the same message. In one embodiment, two namespaces names are considered equivalent if their representation is byte-for-byte identical.

[0468] In one embodiment, one or more message element namespaces may be pre-defined and reserved for user applications and services; peer-to-peer platform protocols and/or services may not use or modify elements in these reserved namespace. In one embodiment, one or more namespaces may be reserved for internal use by the peer-to-peer platform protocols and services. In this embodiment, applications preferably do not create, manipulate or assume the interpretation of any of the content of elements in these namespaces. In some bindings, applications may be forbidden from accessing or creating elements in these namespaces. In one embodiment, use of namespaces by services and applications may be optional. In one embodiment, namespaces may not require formal registration as the protocols used need only be agreed upon by the participants.

[0469] In one embodiment, message elements may have an optional name. Elements in the same message may have the same name.

[0470] In one embodiment, a type may be specified as a MIME type. The type may be used by the applications and services that process the element. In one embodiment, there may be no restriction on the set of MIME types that can be used by applications and services. In one embodiment, the type of the element may be examined by a peer-to-peer platform transport to determine how to format the message element to ensure the most efficient transfer. In one embodiment, if a type is not specified for an element, an application stream may be assumed.

[0471] In one embodiment, the contents of the element data may be opaque to except to the applications and services which use these elements.

[0472] In one embodiment, a message may be a Datagram that may include an envelope and a stack of protocol headers with bodies and an optional trailer. The envelope may include, but is not limited to, a header, a message digest, (optionally) the source endpoint, and the destination endpoint. In one embodiment, each protocol header may include, but is not limited to, a tag naming the protocol in use and a body length. Each protocol body may be a variable length amount of bytes that is protocol tag dependent. Each protocol body may include, but is not limited to, one or more credentials used to identify the sender to the receiver. In one embodiment, such a message format may support multiple transport standards. In one embodiment, an optional trailer may include traces and accounting information.

[0473] The messaging layer may use the transport specified by the URN to send and receive messages. In one embodiment, both reliable connection-based transports such as TCP/IP and unreliable connectionless transports like UDP/IP may be supported. Other existing message transports such as IrDA, and emerging transports like Bluetooth may be supported using the peer endpoint addressing scheme. In one embodiment, peer-to-peer platform messages may be useable on top of asynchronous, unreliable, and unidirectional transport. In one embodiment, the peer-to-peer platform protocols may use a low-level message transport layer (e.g. XML) as a basis for providing Internet-scalable peer-to-peer communication. In one embodiment, the peer-to-peer platform may not assume that the networking transport is IP-based.

[0474] The message digest in the envelope may be used to guarantee the data integrity of messages. Messages may also be encrypted and signed for confidentiality and refutability. In one embodiment, each protocol body may include one or more credentials used to identify the sender to the receiver. A credential is a key that, when presented in a message body, may be used to identify a sender and to verify that sender's right to send the message to the specified endpoint. In one embodiment, the credential may be an opaque token that may be presented each time a message is sent. In one embodiment, the sending address placed in the message envelope may be crosschecked with the sender's identity in the credential. Credentials may be stored in the message body on a per-protocol <tag> basis. In one embodiment, the exact format and content of the credentials are not specified by the peer-to-peer platform. For example, a credential may be a signature that provides proof of message integrity and/or origin. As another example, a message body may be encrypted, with the credential providing further information on how to decrypt the content. In one embodiment, each credential's implementation may be specified as a plug-in configuration, which may allow multiple authentication configurations to coexist on the same network.

[0475] When an unreliable networking transport is used, each message may be delivered more than once to the same destination or may not arrive at the destination. Two or more messages may arrive in a different order than sent. In one embodiment, high-level communication services layered upon the core protocols may perform message re-ordering, duplicate message removal, and processing acknowledgement messages that indicate some previously sent message actually arrived at a peer. Regardless of transport, messages may be unicast (point to point) between two peers or may be propagated (like a multicast) to a peer group. In one embodiment, no multicast support in the underlying transport is required. In one embodiment, peers receiving a corrupted or compromised message may discard the message. Messages may be corrupted or intentionally altered in transmission on the network.

[0476] In one embodiment, the peer-to-peer platform may not mandate how messages are propagated. For example, when a peer sends out a peer discovery message, the peer discovery protocol may not dictate if the message should be confined to the local area network only, or if it must be propagated to every corner of the world.

[0477] In one embodiment, the peer-to-peer platform messages 252 may be defined with the envelope 250 as illustrated in FIG. 5. In one embodiment, the messages are defined in a markup language. In one embodiment, the markup language is XML. The following is an exemplary message in XML: <SampleMessage> <SampleMessageVersion> version number “1.0”</SampleMessageVersion> <SampleMessageDest> destination peer identifier </SampleMessageDest> <SampleMessageSrc> source peer identifier </SampleMessageSrc> <SampleMessageDigest> digest </SampleMessageDigest> <SampleMessageTagName> tag </SampleMessageTagName> <SampleMessageTagData> body </SampleMessageTagData> ............. <SampleMessageTagName> tag </SampleMessageTagName> <SampleMessageTagData> body </SampleMessageTagData> <SampleMessageTrailer> String</ SampleMessageTrailer> </SampleMessage>

[0478] The version number may be a string. The destination and source peer identifier may be represented as peer-to-peer platform identifiers (UUIDs). In one embodiment, the digest is either an MD5 or SHA1 hash or a digital signature. The digest may serve as a placeholder for either. A message may have as many tag parts as needed. In one embodiment, the tag name may be a string and the body may be a byte array containing a string without XML escape characters (“<”, “>”) or a base 64 encoded string.

[0479] In one embodiment, the message format may support binary data and/or multi-part messages with MIME-types. The message format may allow for arbitrary message header fields, including optional header fields. The message format may allow for data verification of message content and the cryptographic signing of messages. The message format may provide an arbitrary number of named subsections that may contain any form of data of any (reasonable) size. The message format may be “email-safe” such that its contents may be extracted reliably after standard textual transformations committed my E-mail client and server software.

[0480] Software Modules

[0481] In a peer-to-peer network, one embodiment of a peer-to-peer platform may use a mechanism for abstract identity and definition of software modules (e.g. services, applications, etc.) to provide information about the programming interface and functionality of the software modules independently of protocols and behaviors that may be used to implement the software modules. Further, software modules in a peer-to-peer network may provide one or more implementations of a given functionality, using various protocols and behaviors, while retaining a common programming interface. The software modules may also provide one or more different network-compatible implementations for different execution environments.

[0482] Embodiments may use identifiers (e.g., UUIDs) and advertisements as described herein to describe and identify software modules, such as services and applications, in a hierarchical manner. In one embodiment, a software module may be described in a module class advertisement and given a module class identifier. If that software module is used for different purposes in the same context, the software module may be further identified by an extension to its module class identifier referred to as a role identifier. Each independent embodiment of the software module that provides an independent set of network protocols and behaviors may be assigned a module specification identifier.

[0483] In one embodiment, all implementations of all embodiments of a given module class for a given execution environment may have the same programming interface. Therefore, software modules interacting locally may express their dependencies via their respective class identifiers (including the role extension), regardless of the particular execution environment and embodiment that was selected when configuring that environment.

[0484] In one embodiment, a software module may be assigned a module class identifier. Each independent embodiment of the software module that provides an independent set of network protocols and behaviors may be described by a module specification advertisement and assigned a module specification identifier. In one embodiment, a module specification identifier may be an extension of the identifier of the module class of which the module specification is an embodiment. In one embodiment, each implementation of each module specification may be described by a module implementation advertisement that may include one or more of, but is not limited to, the following information: a module specification identifier, an execution environment description, and a reference to a software environment (e.g. a software package which implements the module specification for the execution environment).

[0485] To abstract software modules in peer-to-peer networking environments, embodiments may use a tiered architecture to define modules (e.g. services, advertisements, etc.) in a peer-to-peer environment. FIG. 31 illustrates this tiered architecture according to one embodiment. A first level of the tier may include one or more module classes 1000. In one embodiment as illustrated in FIG. 31, each module class 1000 may have one module specification 1002. A module specification 1002 may have one or more module implementations 1004. FIG. 32 illustrates the tiered architecture according to another embodiment. In this embodiment, each module class 1000 may have one or more module specifications 1002. Each module specification 1002 may have one or more module implementations 1004. In one embodiment, the module class 1000 may include and/or define one or more of, but is not limited to, the “role” a module plays (e.g., in a peer group), how the module appears to other modules (e.g., services and applications), plus the module's API in each supported binding. In one embodiment, the module specification 1002 may include and/or define one or more of, but is not limited to, the module's behavior as it appears from the outside (e.g. from other modules), including the module's wire protocol and the module's compatibility with other instances of the same module, for example on other peers. In one embodiment, the module implementation(s) 1004 may include one or more implementations of each module specification 1002, with each module implementation being specific for one or more of various execution environments, bindings and other constraints. Each of these aspects of a module may be published separately in advertisements.

[0486] To access a software module, a peer (or other entity such as another software module (e.g. service, application, etc.)) may use a discovery process such as that described herein for the peer-to-peer platform to discover a module implementation advertisement corresponding to the execution environment of the peer. In one embodiment, the discovery process may search for and discover peer specification advertisements that meet the specification requirements of the peer, and use the one or more discovered peer specification advertisements to locate a particular peer implementation advertisement for a module implementation suitable for use in the peer's execution environment.

[0487] The layers of advertisements (module class, module specification, and module implementation) may be used to abstract the software modules (e.g. services) and platforms, to locate specifications for desired software modules, to locate implementations of the software modules, and to load and run the software modules.

[0488] Embodiments may provide a mechanism to identify a particular software module (e.g. a service) and its behavior. In one embodiment, a software module such as a service may be described with a module specification identifier. The module specification advertisement describes the software module, e.g. the behavior of the software module. In one embodiment, no matter what platform a user (or other entity such as another software module) is on, the user or other entity may locate (e.g. by a discovery process) a particular implementation of the software module for the particular platform and be able to use the software module. The module implementation advertisements may describe implementations of the software module (which may be identified by a module specification identifier, included in the module implementation advertisements and the module specification advertisement) for different platforms, e.g. Windows, Unix and Solaris platforms.

[0489] As an example, a user or other entity may be able to locate and use a particular implementation of a printing service for use with the platform the user or other entity is on. In one embodiment, the user or other entity may first search for and locate a specification for the software module, and once that is located the user or other entity may look for a particular implementation of the software module usable on the user or other entity's platform, load the implementation of the software module according to the advertisements for use on the platform, and run the software module.

[0490] The layers of advertisements may also serve to separate the specification from the implementation. This may reduce the size of the module implementation advertisements, as the advertisements do not need to include the full specification for the software module but instead may refer back to the specification advertisement via the module specification identifier. This may allow software modules to be initially located by specification for a particular class of functionality, rather than having to search through many implementation advertisements of software modules to find a desired implementation of a specification, preferably making the discovery process simpler.

[0491] In one embodiment, after locating a desired module implementation advertisement, using a PURI (Package Uniform Resource Identifier, described below) of the module implementation advertisement, on a Java platform, a URI or URL to the actual code of the software module may be specified. On other platforms such as Unix and Linux, a file location may be specified by URL, URI, or other mechanisms. The code may be downloaded, referenced on disk, or referenced by the URI or other mechanism. The SURI (Specification URI, described below) of the module specification advertisement may function similarly to retrieve a document containing the module specification

[0492] Services

[0493] Peers may cooperate and communicate to publish, discover and invoke network services. A service denotes a set of functions that a provider offers. In one embodiment, a peer-to-peer platform peer can offer a service by itself or in cooperation with other peers. In one embodiment, a peer may publicize a service by publishing a service advertisement for the service. Other peers may then discover the service using the peer discovery protocol (through the advertisement) and make use of it. A peer may publish as many services as it can provide.

[0494] In one embodiment, services may either be pre-installed into a peer or loaded from the network. The process of finding, downloading and installing a service from the network may include performing a search on the network for the service, retrieving the service, and then installing the service. Once a service is installed and activated, pipes may be used to communicate with the service. In one embodiment, peer-to-peer platform-enabled services may publish pipe advertisements as their main invocation mechanism. The service advertisement may specify one or more pipe advertisements that may be used by a peer to create output pipes to invoke the service. The service advertisement may also include a list of predetermined messages that may be sent by a peer to interact with the service. The service advertisement may describe all messages that a client may send or receive.

[0495] Several methods may be provided by various embodiments to publish a service. Services may be published before creating a new peer group by adding the service advertisement to the peer group advertisement. Services may also be published by adding the services in a separate peer service advertisement. The discovery service may also allow new advertisements to be added at runtime. The new advertisement will belong to a predefined peer group. Other methods of publishing services may be provided. Note that service advertisements may be placed in the peer group advertisement of any group. Since all peers belong to the global peer group, a peer may publish the service in the global peer group advertisement to make it available to any peer.

[0496] In one embodiment, services advertised in a peer group advertisement may be instantiated for a peer when the peer joins the group. In one embodiment, all the services are instantiated. In another embodiment, none, one, or more of the advertised services may be instantiated when the peer joins the peer group. Service advertisements in the peer group advertisement may include resolver, discovery, membership, peer information and pipe service advertisements. In one embodiment, services advertised in a peer group advertisement are loaded on the peer when the peer boots. In one embodiment, this automated loading is not mandatory but is part of the Java Binding. One embodiment may provide a mechanism to force a service in a peer group advertisement to be instantiated by a peer.

[0497] In one embodiment, when a peer boots, any services advertised in the peer advertisement are loaded. The peer advertisement corresponds to the platform advertisement. These services may include the minimal set of services to bootstrap the creation of new peers: discovery service, membership service, resolver service, peer information service and pipe service.

[0498] In one embodiment, when a peer switches from one peer group to another, the first group's services remain active. In one embodiment, a peer may call a stop method on the service application interface to stop an instance of a local service. A peer that is a member of one peer group that refers to a service may join a second peer group that also refers to the service while still a member of the first. Whether the service is instantiated once or twice may depend on the service implementation. Some service implementations may use a static instantiation that is done once. In this case, all groups share the same instance. Other service implementations are local to a peer group and are not aware of the state of any other peer groups on the same node.

[0499] In one embodiment, services may use a “time to live” indicator that defines when the service was created, and may also define the lifetime of the service. After its lifetime has expired, the stale service may be purged.

[0500] A service may be well-defined and widely available so that a peer can use it directly. Other services may require special code to access the service. For example, the way to interface with the service provider may be encoded in a piece of software. In this example, it may be desirable for the peer to be able to locate an implementation that is suitable for the peer's specific runtime environment. In one embodiment, if multiple implementations of the same service are available, then peers hosted on Java runtimes can use Java programming language implementations while native peers to use native code implementations. In one embodiment, service implementations may be pre-installed into a peer node or loaded from the network. In one embodiment, once a service is installed and activated, pipes may be used to communicate with the service.

[0501] In one embodiment, each service may have a unique identifier. In one embodiment, a service may have a name that may include a canonical name string that may indicate the type and/or purpose of the service. A service may also provide optional information (e.g. a set of descriptive keywords) that further describes the service. The unique identifier, name and optional information may be stored within a service advertisement. The advertisement may also include other information needed to configure and instantiate a service.

[0502] In one embodiment, the peer-to-peer platform may recognize two levels of services, peer services and peer group services. A service that executes only on a single peer may be referred to as a peer service. A peer service is accessible only on the peer that is publishing the service. If that peer happens to fail, then service also fails. This level of service reliability may be acceptable for an embedded device, for example, providing a calendar and email client to a single user. Multiple instances of the service may be run on different peers, but each instance publishes its own advertisement. A service that is composed of a collection of cooperating instances (potentially cooperating with each other) of the service running on multiple peers in a peer group may be referred to as a peer group service. A peer group service may employ fault tolerance algorithms to provide the service at a higher level of availability than that a peer service can offer. If any one peer fails, the collective peer group service may not be affected, because the service may still be available from at least one other peer member. Peer group services may be published as part of the peer group advertisement.

[0503] In one embodiment, the peer-to-peer platform may include a set of default peer group services such as peer discovery, as well as a set of configurable services such as routing. In one embodiment, a peer-to-peer platform peer may not be required to have one or all of these services. For example, a cell phone peer may be pre-configured with enough information to contact a fixed server provided by the telecom operator. This may be enough to bootstrap the cell phone peer without requiring it to independently carry with it additional services.

[0504] In one embodiment, although the concept of a service is orthogonal to that of a peer and a peer group, a peer group formed using the peer-to-peer platform may require a minimum set of services needed to support the operation of the group. Some services may be well known and may be referred to as peer-to-peer platform core services. Embodiments of the peer-to-peer platform may define a set of core peer group services that may be used to form and support peer groups. In one embodiment, the core peer group services may provide the minimum services required to form a peer group (e.g. membership and discovery services). In one embodiment, the peer-to-peer platform core services may be 100% decentralized and thus may enable pure peer-to-peer network computing. In one embodiment, it is not required that all core services be implemented by every peer group.

[0505] In one embodiment, the peer-to-peer platform may define peer group core services including, but not limited to, a discovery service, a membership service, an access service, a pipe service, a resolver service and a monitoring service. A discovery service may be used to search for peer group resources such as peers, peer groups, and pipes. The search criteria may include a resource name. Discovery and discovery services are described more fully later in this document.

[0506] In one embodiment, most peer groups will have at least a membership service. Current peer group members may use the membership service during the login process to reject or accept a new peer group membership application. The membership service may be a “null” authenticator service that imposes no real membership policy. Peers wishing to join a peer group first locate a current member, and then request to join. The application to join may be either rejected or accepted by the collective set of current members. The membership service may enforce a vote of peers or alternatively elect a designated group representative to accept or reject new membership applications.

[0507] An access service may be used to validate, distribute, and authenticate a group member's credentials. The access service may define the type of credential used in the message-based protocols used within the peer group. The access service may be used to validate requests made by one peer to another. The peer receiving the request provides the requesting peer's credentials and information about the request being made to the access service to determine if the access is permitted. In one embodiment, not all actions within the peer group need to be checked with the access service, only those actions which only some peers are permitted to use.

[0508] A pipe service may be used to establish and manage pipe connections between the different peer group members. A resolver service may be used to send query string to peers to find information about a peer, a peer group, a service or a pipe. A monitoring service is used to allow one peer to monitor other members of the same peer group.

[0509] In on embodiment, not all the above services are required to be implemented by a peer group. Each service may implement one or more of the peer-to-peer platform protocols. In one embodiment, a service may implement at least one protocol for simplicity and modularity reasons, but some services may not implement any protocols.

[0510] Other services may be user-defined and provide application dependent services such as content searching and indexing. A user-defined service may provide additional APIs. User-defined services may be implemented that may offer the ability to mix-in centralization as a means of increasing performance. In one embodiment, the peer-to-peer platform core services may provide a reference implementation for user-defined services. Examples of user defined services may include, but are not limited to:

[0511] Efficient long-distance peer lookup and rendezvous using a peer naming and discovery service.

[0512] Simple, low-cost information search and indexing using a content sharing service.

[0513] Interoperability with existing centralized networking infrastructure and security authorities in corporate, public, private, or university networks using administration services.

[0514] A resolver service may be implemented to find active (running on some peer) and inactive (not yet running) service instances.

[0515] An FTP service that allows file transfers among peers over pipes using FTP.

[0516] Network Services

[0517] Embodiments of the mechanism for abstract identity and definition of software modules in peer-to-peer networking environments may be used in implementing network services. A network service may be considered as one type of software module that may be abstracted using the mechanism. Software modules may also include applications, among other types.

[0518] In one embodiment, peers may cooperate and communicate to publish, discover and invoke network services. In one embodiment, peers may discover network services via the peer discovery protocol of the exemplary peer-to-peer platform described herein. In one embodiment, network services may include peer services and peer group services. A peer service may be accessible only on the peer that is publishing the service. If that peer happens to fail, then the service also fails. Multiple instances of the service may be run on different peers, but each instance publishes its own advertisement. A peer group service is composed of a collection of instances (potentially cooperating with each other) of the service running on multiple members of the peer group. If any one peer fails, the collective peer group service may not be affected, because the service may still be available from another peer member. Peer group services may be published as part of the peer group advertisement.

[0519] In one embodiment, services may be pre-installed into a peer or loaded from the network. The peer may follow a process of finding, downloading and installing a service from the network. To run a service, a peer may have to locate an implementation of the service (i.e. a module implementation) suitable for the peer's runtime environment. Multiple implementations of the same service may allow, for example, Java peers to use Java code implementations, and native peers to use native code implementations.

[0520] In one embodiment, the peer-to-peer platform may be designed to interoperate and be compatible with various Web service standards including one or more of, but not limited to, WSDL, uPnP, RMI, etc. The peer-to-peer platform protocols may define a generic framework to publish and discover advertisements that may describe services. In one embodiment, peers may publish and discover advertisements via the peer discovery protocol. In one embodiment, an advertisement for a service may include necessary information to either invoke or instantiate the service being described. In one embodiment, one or more peer-to-peer platform protocols may define module advertisements to describe services.

[0521] In one embodiment, peer-to-peer platform-enabled services are services that are published using module specification advertisements. In one embodiment, a module specification advertisement may specify a pipe advertisement that may be used by a peer to create output pipes to invoke the service. In one embodiment, a module specification advertisement may include a list of pre-determined messages that may be sent by a peer to interact with the service. In one embodiment, a module specification advertisement may include references to one or more other services that may be used as an authenticator for the service and/or as a local proxy for the service. In one embodiment, each service may be uniquely identified by its module specification identifier.

[0522] In one embodiment, a service may have several aspects including, but not limited to:

[0523] The “role” the service plays in the group; how the service appears to other services and applications, plus the service's API in each supported binding. This may be referred to as the service class (i.e. the module class).

[0524] The service's apparent behavior from the outside, including, but not limited to, wire protocol, and compatibility with the same service on other peers. In other words, a central definition of a service, or the service's specification. This may be referred to as the service specification (i.e. the module specification).

[0525] One or more implementations of the specification for various execution environments, bindings and other constraints. These may be referred to as the service implementations (i.e. module implementations).

[0526] Each of these aspects of a service may be published separately, e.g. by the module advertisements described above. In one embodiment, there may be more specifications than classes and more implementations than specifications. In many cases, only the implementation is needed, for example, when instantiating a group that uses the service(s). The layered arrangement of class/specification(s)/implementation(s) may help save storage space by not requiring that information be duplicated in all implementation advertisements, and may help to prevent the downloading of unneeded data. If this information was duplicated in all implementation advertisements, not only would it occupy more storage space than needed, but it also may cause the downloading of unneeded data.

[0527] Service specifications may be assigned a unique identifier at the time the advertisement is published. Service implementations may use this identifier to denote which service specification they implement. Service classes may be assigned a unique identifier when the class's advertisement is first published.

[0528] In one embodiment, service specifications may use identical implementations; therefore, service specification advertisements may include a “free form” parameter section that includes one or more parameters that may be used to control behavior. In one embodiment, service implementations may use identical code; therefore, service implementation advertisements may include a “free form” parameter section that includes one or more implementation-dependent parameters.

[0529] In one embodiment, services may refer to each other (such as when obtaining the interface of another service from the group) by their class identifier.

[0530] In one embodiment, the same service specification may be used to perform more than one role in a group. For example, consider two instances of the same data base service with two completely different data set and purposes. To support this, it service class identifiers may be extended with a “role” suffix. In this embodiment, service class identifiers without a role suffix may accept a null role suffix as a valid role suffix. Thus, service class identifiers may be “roled,” and if “roleing” is never needed, only a short service class identifier may be needed.

[0531] In one embodiment, service specification identifiers may built from the class identifier of the class that the service specification implements. In one embodiment, only the base class UUID may be included so that service specification identifiers are unchanged by the addition of roles. This may be used, for example, to verify that a service specification does have the interface implied by the corresponding service class, regardless of the role for which it is used.

[0532] In one embodiment, service implementation advertisements may list compatibility requirements which may make them eligible to be loaded by a given group running in a given peer-to-peer platform implementation.

[0533] In one embodiment, groups, applications and endpoints may have similar constraints as services. For a group, the group specification may list the service specifications that this group supports. There may be one or more implementations, depending on various execution constraints. Endpoints and applications may function similarly or identically to services (i.e. groups, applications and endpoints may be considered “modules” as are services). Therefore, the mechanisms described above for services may also be used for groups, applications and endpoints.

[0534] In one embodiment, a peer group specification advertisement may include indications of services, endpoints and initial applications of the peer group.

[0535] Similarly to how service implementations are correlated to service specifications by a service specification identifier, a peer group implementation may be correlated to a group specification by a unique identifier. This identifier may be referred to as a peer group identifier. A peer group specification may be a relatively large document. In one embodiment, since most of the peer group specification may only be needed if the group is to be instantiated, for publicizing a group, a peer group specification advertisements including only a name, an identifier, and one or more keywords may be used to publish a peer group. In one embodiment, to reduce the size of peer group specification advertisements, inheritance may be used between group definitions. Since most groups have a lot in common, a peer group specification advertisement may refer to another advertisement which may be common and therefore cached. The above approaches to reducing the size of peer group specification advertisements may be complementary.

[0536] In one embodiment, groups may load plug-in services according to the group's implementation. In one embodiment, service descriptions may not be required in a group advertisement. However, even if services are not implemented via plug-ins, the existence of services may be a property of the group that is visible “on the wire.” Therefore, peer group specification advertisements may list references to service specifications (e.g. the service specification identifier). In one embodiment, it may be the responsibility of a group's implementation to realize the services listed in the peer group specification advertisement by loading a supported implementation for each service, by implementing the service internally, or optionally using one or more other mechanisms. In one embodiment, the service realization mechanism(s) used is group implementation dependent.

[0537] In one embodiment, module (e.g. service) specification advertisements may not need to be downloaded in order to instantiate a group unless one of the module (e.g. service) implementations needs parameters from the module (e.g. service) specification. In one embodiment, module (e.g. service) specifications may be used by users when creating an implementation of the module (e.g. service).

[0538] In one embodiment, groups may need to uniquely identify each of their services, for example, to improve the robustness of demultiplexing service-addressed messages. Since each service in a group belongs to a service class, and no more than one service of each class may exist in a group, the combination of the group identifier and the service class identifier uniquely identify that service for service addressing purposes.

[0539] In one embodiment, services may bind to and use each other. In obtaining an interface to one of the other services, a service may use the other service's class identifier to designate this other service. Services “know” each other by their role; and therefore they designate each other by their class identifiers. For example, an implementation of a discovery service may know that it needs a “Resolver.”

[0540] In one embodiment, for each service, a group advertisement may list service specification identifiers for services of the group, since each service specification identifier includes a corresponding service class identifier. In one embodiment, to support roles, a group advertisement may optionally list an additional service class identifier for each service. This identifier may differ from that embedded in the specification identifier includes in that the former may have a role suffix and not the latter. In one embodiment, no two services may be assigned the same role in a given group.

[0541] In one embodiment, peer groups may have a variety of specifications, but may use a small number of implementations for the peer group API itself. The specification of the peer group functionality is the peer group specification advertisement, with its unique features and identifier. In one embodiment, to avoid publishing identical peer group implementation advertisements (except for the service specification identifier of the group) for each group, roles may be used. Similar to services, groups may come in a small family of APIs and behavior of the peer group class, and any number of roles for which they are used (e.g. in the case of a group, various communities of users). Therefore, the “Role” model described for services may be extended to groups. There may be more than one class of group. Further, there may be Roles in these group classes. In one embodiment, the role identifier may include the base class plus role suffix.

[0542] In one embodiment, a peer group specification advertisement may have two identifiers: the specification identifier that corresponds to the particular group service specification that is being used and the full class identifier (in one embodiment, including a role extension) that may be different for every group. In one embodiment, a service specification advertisement may include a class identifier in addition to a specification identifier, thereby specializing it for a given role (e.g. by changing parameters). In one embodiment, service specifications may be looked-up by their specification identifier, and service specifications may not be specialized for a role. In one embodiment, peer group specification advertisements may be looked-up by specification identifier and role identifier. In one embodiment, not specifying a role identifier when looking up a group may result in an error, but may be used for browsing purposes.

[0543] In one embodiment, specifying a group may require one or more of, but may not be limited to:

[0544] Identifiers:

[0545] A peer group identifier: Identifies the community built around that group. May be turned into a full class identifier when they become different from base class identifiers.

[0546] A peer group specification identifier: Equivalent to a service specification identifier. Identifies the behavior of the Peer Group class (in the programming sense) being used, not the community build around it.

[0547] Advertisements (may be optional or required):

[0548] Service class advertisement. In one embodiment, may be required.

[0549] Peer group specification advertisement: Name, identifier, the list of all services, etc. May be inherited from another group. In one embodiment, may be required.

[0550] Peer group implementation advertisement: one implementation of the code that drives the group. In one embodiment, may be cached and reused. In one embodiment, may be required.

[0551] Peer Group Advertisement: an abbreviated publicizing of the group. In one embodiment, may be optional.

[0552] In one embodiment, describing a service may require one or more of, but may not be limited to:

[0553] Identifiers:

[0554] Service class identifier: denotes functionality and an expected API per supported binding (e.g., pipe, resolver, discovery, etc.). In one embodiment, if there is no role suffix (role=base class), this may be fully embedded in a service specification identifier and therefore may need to be repeated in the group advertisement.

[0555] Service specification identifier: denotes additional on-the-wire behavior in providing a service defined by its class (e.g., platform's pipe, Intermittent Pipe, Reliable Pipe, etc.)

[0556] Advertisements:

[0557] Service class advertisement: describes a role and may describe a per-platform set of APIs does.

[0558] Service specification advertisement: describes a protocol and behavior. In one embodiment, may be specialized for a role.

[0559] Service implementation advertisement: describes an implementation for a given platform. In one embodiment, may be cached and reused.

[0560] In one embodiment, group identifiers may be constructed so that they are upward compatible with full class identifiers.

[0561] In one embodiment, there is one peer advertisement for each group instantiated on a peer. In one embodiment, a peer advertisement may describe only what is relevant to this group on this peer, in addition to describing the group. A peer advertisement may include one or more of, but is not limited to, one or more parameters that are particular to one given peer for each service, a peer identifier, name and keywords. In one embodiment, a peer advertisement may include only what needs to be published outside the peer, e.g. endpoint addresses, etc. In one embodiment, items that affect only the local behavior or that are not specified as being explicitly published (e.g. debug) may be left out of the peer advertisement and may go into an optional configuration document passed to the peer group object as an extra parameter. In one embodiment, in both the configuration document and the peer advertisement, variables may be related to services by the service class identifier; each setting may be a <Setting> element, tagged with a service class identifier. If there is no identifier, it means that the setting applies to all services of this group.

[0562] The following is an example of a layout to list a service, and is not intended to be limiting:

[0563] <Service>ServiceSpeclD1</Service>

[0564] The following is another example of a layout to list a service, and is not intended to be limiting: <Service> <ServiceSpecID>ServiceSpecID1</ServiceSpecID> <ServiceClassID>ServiceClassID1</ServiceClassID> <SomeFOtherAttribute>whatever</SomeOtherAttribute> <IService>

[0565] Similar layouts may be used for other modules such as endpoints, applications and/or groups.

[0566] In one embodiment, peer groups may be defined by service specification advertisements with the group identifier equivalent to the role identifier. In this embodiment, the peer group advertisement may be an abbreviated version of the service specification. In another embodiment, services may be listed in the implementation advertisement for the group. In this embodiment, the implementation advertisement may refer to the peer group class used, with the parameter field listing the services. The group identifier may exist only in the peer group advertisement, which is the root definition of the group. Using this embodiment, there may be no need to obtain the specification advertisement of the group in order to instantiate it. This group advertisement includes the specification identifier of the group that is matched by that specification identifier in associated implementation advertisements, so that an implementation of the group may be acquired directly from the peer group advertisement without having to lookup the specification.

[0567] In one embodiment, the implementation advertisement of a service may be included in-line in the implementation advertisement of a group that uses it, rather than including the service's specification identifier.

[0568] As used herein, the term “module” includes the notion of any random code not part of the core system. In general, a module is a generic, loadable “thing” that has ini( ), start( ) and stop( ) methods or their equivalents. Applications and services may be considered subclasses of modules. A “Service” is a subclass of module that has “get interface” and “get implementation advertisement” methods, making it suitable for registration with a group. In one embodiment, modules may also include code that has a known API and identity (its class identifier) and which can be looked-up with group lookup service.

[0569] In one embodiment, the peer configuration document has the format of a peer advertisement. In one embodiment, the peer group API may include one or more methods that assist in loading modules, e.g. a “load module” method. In one embodiment, loading a peer group may be similar to loading any other module; one or more additional methods may be included to perform one or more tasks particular to loading a peer group.

[0570] In one embodiment, the definition of a group or other module (that is, the class that implements it for which binding, and with which parameters) is immutable. The information about the group or other module's instantiation on a peer (e.g. everything that may be different on each peer, such as endpoint addresses, rendezvous status, etc) may been separated into a different advertisement: the peer advertisement.

[0571] In one embodiment, there may be one or more parameters that are private to a peer and essentially the result of a choice by the user or defaults that depend on the particular peer that instantiates that module or group (e.g. local network interfaces, well-known rendezvous, etc.). These may be similar to the content of a peer advertisement, but may not be published (or alternatively, if published, it is by the decision of the module and copied by that module to the peer advertisement). The document that includes these unpublished parameters may be a peer advertisement that may be passed as an argument to the module's init routine. In one embodiment, providing the peer advertisement as an argument may be optional.

[0572] The following is an exemplary initialization routine for modules and is not intended to be limiting:

[0573] Init (group, assignedID, implAdv, configAdv);

[0574] where:

[0575] Group: The group that provides the peer-to-peer platform API to this module: If the module is a group, this is its parent group. If this module is a service, group is the group of which this service is a part. If the module is an application, group is the group within which this application runs.

[0576] assignedID: Assigned identifier. A unique identifier assigned to this module by its group. If this module is a group, the assigned identifier is its group identifier.

[0577] If this module is a service, then this is the full class identifier of that service in that group. In one embodiment, the full class identifier listed in the group's implementation advertisement may be used. In one embodiment, if this module is a main application of a peer group, then its assigned identifier may be a full class identifier of the base class application. In one embodiment, the role part may be assigned randomly in order to be unique. Otherwise, in one embodiment, it may be anything, including null. In one embodiment, a service may find its configuration parameters indexed under its assigned identifier in the configuration advertisement, and may update its published parameters under its assigned identifier in the peer advertisement.

[0578] implAdv: The implementation advertisement from which this module was loaded. In one embodiment, if this module is a subclass of a standard (base) peer group class, then the <Parm> section of this advertisement may include a complete list of the services that this group includes. If the module is an application, the module may have been loaded directly from its class, bypassing the implementation advertisement lookup. As a result, there may not be an implementation advertisement available, in which case “null” may be passed for this argument. In one embodiment, the standard peer group may pass an implementation advertisement to the main application(s).

[0579] configAdv: The configuration advertisement for this module. As for assigned identifier and implementation advertisement, this may be null if the module is an application. In one embodiment, the standard peer group may pass its configuration advertisement through to the main application(s).

[0580] One embodiment may include an initialization routine for modules in order to avoid resorting to reflection when loading and initializing modules. In one embodiment, modules may only include a default constructor, and the initialization routine may serve as a substitute to having a constructor with parameters. The initialization routine, followed by a start application routine gets the module running. In one embodiment, a “stop application” routine may shut down that module. In one embodiment, after calling the stop application routine, the module may be unreferenced and garbage collected. To resume running the module, the module may be loaded from scratch again.

[0581] One embodiment may include a “start application” routine in addition to an initialization routine in order to be able to operate on the module once its is fully constructed but before it starts running. What “starts running” means may be defined by each module in relation to the effects of whichever methods the particular module provides that affect its behavior.

[0582] In one embodiment, services may be registered with the peer group upon returning from the init routine. In this embodiment, services may be ready to have their public methods invoked upon returning from the initialization routine. In one embodiment, the services may not be obligated to provide full functionality. In one embodiment, public methods may fail gracefully if they cannot perform fully. In this embodiment, services may expect all other services of the group to be available from the group's registry upon their start application method being invoked, and to have the public methods of these services either fully work or fail nicely. In one embodiment, both the initialization and the start application methods of a module may be required to “return.” In other embodiments, either one or both of these methods may not be required to return.

[0583] Advertisements

[0584] In one embodiment, the peer-to-peer protocols may use advertisements to describe and publish the existence of peer resources. An advertisement may be defined as a structured, language neutral metadata structure that names, describes, and publishes the existence of a peer-to-peer platform resource. Network resources such as peers, peer groups, pipes, and modules such as services may be represented by advertisements. Advertisements may be used to describe one or more of, but not limited to, peers, peer groups, pipes, content, rendezvous, and modules such as services and other types of network resources. Advertisement types provided by the peer-to-peer platform may include one or more of, but are not limited to, peer advertisements, peer group advertisements, module class advertisements, module specification advertisements, module implementation advertisements, pipe advertisements, and rendezvous advertisements. Advertisements may be exchanged as documents in peer-to-peer protocol messages. One or more of the peer-to-peer platform protocols may use advertisements to provide information to entities interested in the peer-to-peer resources represented by the advertisements. Peer-to-peer platform protocols may be used to pass advertisements between peers.

[0585] In one embodiment, advertisements may include a series of hierarchically arranged elements. The elements may appear in arbitrary order within the advertisement. Each element may include data or additional elements. An element may also have attributes. In one embodiment, attributes are name-value string pairs. An attribute may be used, for example, to store meta-data that helps to describe the data within the element.

[0586] In one embodiment, peer-to-peer platform advertisements may be represented in the eXtensible Markup Language (XML). Other embodiments may use other encodings such as HTM or WML. In one embodiment, advertisements may be specified using a schema definition language such as the XML Schema Definition Language. In one embodiment, XML advertisements may be translated into other encodings such as HTML and WML to allow peers that do not support XML to access advertised resources.

[0587] In one embodiment, advertisements may be used in the peer-to-peer platform as language-neutral metadata structures. In one embodiment, each software platform binding may describe how advertisements are converted to and from native data structures such as Java objects or ‘C’ structures. Each protocol specification may describe one or more request and response message pairs. In one embodiment, advertisements may be the most common document exchanged in messages.

[0588] Information exchanged between peers may include advertisement documents. In one embodiment, the peer-to-peer platform may advertise documents to represent all of the peer-to-peer platform resources managed by the core platform, such as peers, peer groups, pipes and services. In one embodiment, the peer-to-peer platform may define a set of core advertisements. The peer-to-peer platform may define core advertisement types including, but not limited to, one or more of peer advertisements, peer group advertisements, pipe advertisements, service advertisements, content advertisements, and endpoint advertisements. In one embodiment, user-defined advertisement subtypes (for example, using XML schemas) may be formed from these basic types. Subtypes of the core advertisements may be used to add an unlimited amount of extra, richer metadata to a peer-to-peer network. In one embodiment, the peer-to-peer platform protocols, configurations and core software services operate only on the core advertisements.

[0589] In one embodiment, an advertisement is a markup language structured document that names, describes, and publishes the existence of a peer-to-peer platform resource. In one embodiment, peer-to-peer platform advertisements may be represented in the Extensible Markup Language (XML) and are therefore software platform neutral. XML provides a powerful means of representing data and metadata throughout a distributed system. XML provides universal (software-platform neutral) data because XML is language agnostic, self-describing, strongly-typed and ensures correct syntax. XML advertisements may be strongly typed and validated using XML schemas. XML also allows advertisements to be translated into other encodings such as HTML and WML. This feature allows peers that do not support XML to access advertised resources. In one embodiment, each document may be converted to and from a platform specific representation such as a Java object. In one embodiment, peers supporting the various protocols requiring that advertisements be exchanged in messages may accept only valid XML documents that descend from the base XML advertisement types.

[0590] Advertisements represented in a markup language such as XML, like any markup language document, may be composed of a series of hierarchically arranged elements. Each element may include its data and/or additional elements. An element may also have attributes. Attributes are name-value string pairs. An attribute may be used to store metadata, which may be used to describe the data within the element.

[0591]FIG. 29A illustrates a peer in a peer-to-peer network publishing an advertisement according to one embodiment. Peer 200A may include or may have access to resources that it may publish. Resources may include, but are not limited to, peers, peer groups, software modules (e.g. services, applications, etc.), content, pipes and pipe endpoints. A resource advertisement may include an identifier and a security credential. The identifier and security credential may be compared to confirm that they indicate the same resource when another peer accesses the resource. In one embodiment, a public key may be associated with the advertised resource. In one embodiment, the security credential may be a public key signature.

[0592] Peer 200A may generate resource advertisement 808 which may describe how other peers may access the resource. Resource advertisements may be formatted according to platform-independent markup language schemas defining elements of each type of advertisement (e.g., XML). Peer 200A may allow other peers access to the resource by publishing advertisement 808. In one embodiment, publishing may include sending advertisements to other peers. In FIG. 29A, peer 200A may send advertisement 808 to peers 200B and 200C in messages 820A and 820B. Messages 820A and 820B may be formatted according to a peer-to-peer platform protocol. Another peer may discover advertisement 808 by sending a discovery query message that may include criteria that the resource corresponding to advertisement 808A may match to one or both of peer 200B and peer 200C, and one or both of peer 200B and peer 200C sending a response message that may contain advertisement 808 to the other peer.

[0593]FIG. 29B illustrates a peer in a peer-to-peer network publishing an advertisement to a rendezvous peer according to one embodiment. Peer 200A may publish advertisement 808A by sending it to rendezvous peer 200B in message 820. Rendezvous peer 200B may cache advertisements for other peers to discover. In one embodiment, advertisement 808A may include a time-to-live indicator (TTL). The TTL may indicate a length of time during which the resource advertisement is valid. When the TTL expires, peers may no longer have access to the resource advertisement. Another peer may discover advertisement 808A by sending a discovery query message that may include criteria that the resource corresponding to advertisement 808A may match to peer 200B, and peer 200B sending a response message that may contain advertisement 808 to the other peer.

[0594]FIG. 30 illustrates discovering advertisements according to one embodiment. Peer 200A may broadcast discovery query message 820. Discovery query message 820 may be formatted in accordance with a peer-to-peer platform discovery protocol. Discovery query message 820 may include criteria specifying a particular type of resource in which the peer is interested. When the discovery query message 820 reaches a peer 200B that has advertisements 808A and 808B for resources matching the criteria in the discovery query message, peer 200B may respond by sending peer 200A a response message 822 that may include the advertisements 808A and 808B. Peer 200A may also receive one or more response messages from one or more other peers. Each of these response messages may include advertisements for resources for resources also matching the criteria in the discovery query message. After receiving the resource advertisements, peer 200A may access the corresponding resource. In one embodiment, each resource advertisement may include information describing how to access the particular resource corresponding to the resource advertisement.

[0595] One embodiment may include module class advertisements, module specification advertisements, and module implementation advertisements that may be used, for example, in describing and identifying abstract software modules in peer-to-peer networking environments. FIG. 33 illustrates a module class advertisement 1010, a module specification advertisement 1012, and a module implementation advertisement 1014 for a software module according to one embodiment.

[0596] In one embodiment, a module class advertisement 1010 may be used to describe a class of software modules. A module class advertisement 1010 may describe an expected local behavior and an expected API for each peer-to-peer platform binding that supports the class of software modules. A module class advertisement 1010 may provide a description of what a particular module class identifier 1020 stands for. Module class identifiers 1020 may be used by a software module or other code on the peer-to-peer platform to designate software modules upon which the software module or other code depends. In one embodiment, a module class advertisement 1010 may not provide a completely formal description of the module's behavior and API. In one embodiment, a module class advertisement 1010 may be used to create modules with a similar functionality.

[0597] The following illustrates an exemplary module class advertisement 1010 schema that may be used in embodiments and is not intended to be limiting: <xs:element name=“MCA” type=“xxxx:MCA”/> <xs:complexType name=“MCA”> <xs:sequence> <xs:element name=“MCID” type=“xxxx:identifier”/> <xs:element name=“Name” type=“xs:string” minOccurs=“0”/> <xs:element name=“Desc” type=“xs:anyType” minOccurs=“0”/> </xs:sequence> </xs:complexType>

[0598] where the elements may include one or more of, but are not limited to:

[0599] MCID—Module class identifier 1020 that uniquely identifies the module class.

[0600] Each module class may have a unique identifier. In one embodiment, this is a required element.

[0601] Name—A name associated with the module class. In one embodiment, the name is not required to be unique unless the name is obtained from a centralized naming service that guarantee name uniqueness. In one embodiment, this is an optional element.

[0602] Desc—Description. A string that may be used to describe and search for a module class. In one embodiment, this is an optional element.

[0603] In one embodiment, a module specification advertisement 1012 may be used to describe the specification of a software module. A module specification advertisement 1012 may describe an expected on-wire behavior and protocol. A module specification advertisement 1012 may provide a description of what a particular module specification identifier 1022 stands for. A module specification identifier 1022 may be used by a software module or other code on the peer-to-peer platform to designate a particular network-compatible family of implementations of a given module class. In one embodiment, module specification identifiers 1022 may also be used by a peer group implementation to designate the components that provide the various services that the peer group supports. In one embodiment of the peer-to-peer platform, one or more core peer group services (e.g. discovery, membership, resolver, etc.) may be implemented as software modules.

[0604] A module specification advertisement 1012 may also describe how to invoke and use a software module. In one embodiment, a software module may be accessed through an API (application programming interface) of the module by locating an implementation of the software module, loading the module, and starting the module. In one embodiment, a software module may be accessed via a pipe (e.g. a peer-to-peer platform pipe as described below) accessed using a pipe advertisement included in the software module's module specification advertisement 1012. In one embodiment, a software module may be accessed through a proxy module accessed using a module specification identifier 1022 of the proxy module included in the software module's module specification advertisement 1012.

[0605] The following illustrates an exemplary module specification advertisement 1012 schema that may be used in embodiments and is not intended to be limiting: <xs:element name=“MSA” type=“xxxx:MSA”/> <xs:complexType name=“MSA”> <xs:sequence> <xs:element name=“MSID” type=“xxxx:IDENTIFIER”/> <xs:element name=“Vers” type=“xs:string”/> <xs:element name=“Name” type=“xs:string” minOccurs =“0”/> <xs:element name=“Desc” type=“xs:anyType” minOccurs =“0”/> <xs:element name=“Crtr” type=“xs:string” minOccurs =“0”/> <xs:element name=“SURI” type=“xs:anyURI” minOccurs =“0”/> <xs:element name=“Parm” type=“xs:anyType” minOccurs =“0”/> <xs:element ref=“xxxx:PipeAdvertisement” minOccurs=“0”/> <xs:element name=“Proxy” type=“xs:anyURI” minOccurs=“0”/> <xs:element name=“Auth” type=“xxxx:IDENTIFIER” minOccurs=“0”/> </xs:sequence> </xs:complexType>

[0606] where the elements may include one or more of, but are not limited to:

[0607] MSID—module specification identifier 1022. May uniquely identify the specification. Each module specification may have a unique module specification identifier 1022. In one embodiment, this is a required element.

[0608] Vers—The version of the specification that this advertisement advertises. In one embodiment, this is a required element.

[0609] Name—Name that may be associated with a module specification. The name may not be required to be unique. In one embodiment, the name may be obtained from a centralized naming service that guarantee name uniqueness, and therefore in this embodiment the name may be unique. In one embodiment, this is an optional element.

[0610] Desc—Description. A string that may be used to describe and search for a module specification. In one embodiment, this is an optional element.

[0611] CRTR—Creator. This element designates the creator of this module specification. In one embodiment, this is an optional element.

[0612] SURI—Specification URI (unique resource identifier). This element is a URI that permits the retrieval of a document containing the module specification that this advertisement advertises. In one embodiment, this is an optional element.

[0613] Parm—May include one or more arbitrary parameters that may be interpreted by each implementation.

[0614] xxxx:PipeAdvertisement—Identifies pipe advertisement which this module binds to an input pipe, and which thus may be used to establish a pipe to a nearby running implementation of this module specification. In one embodiment, this element name may be identical to the pipe advertisement document type since the entire element is an embedded pipe advertisement document. In one embodiment, this is an optional element.

[0615] Proxy—Proxy Specification identifier. Module specification identifier 1022 of a proxy module that may be used in order to communicate with modules of this specification. Note that the process may be recursive. The proxy module may be usable via pipes, or optionally through a subsequent proxy module, and may require a subsequent authenticator. In one embodiment, this is an optional element.

[0616] Auth—Authenticator specification identifier. Module specification identifier 1022 of an authenticator module that may be required in order to communicate with modules of this specification. Note that the process may be recursive. The authenticator module may be usable via pipes, or optionally through a subsequent proxy module, and may require a subsequent authenticator. In one embodiment, this is an optional element.

[0617] In one embodiment, a module implementation advertisement 1024 may be used to describe one of the implementations of a module specification. Implementations of a given specification may be searched by the module specification identifier 1022. An implementation may be selected by the type of environment in which it may be used (its compatibility statement) as well as by its name, description or the content of its parameters section.

[0618] A module implementation advertisement 1024 may provide a mechanism to retrieve data that may be required in order to execute the module implementation being described. In one embodiment, this information may be encapsulated in the Code and PURI (Package Uniform Resource Identifier) elements. The interpretation of these elements may be subject to the module's compatibility. For example, a standard peer group implementation of a Java reference implementation may expect the <Code> element to specify a fully qualified Java class name that designates a subclass such as net.xxxx.platform.Module and PURI to be the URI (Uniform Resource Identifier) of a downloadable package (e.g. a jar file). Other execution environments may expect the code to be inline within the <Code> element or even offer several options.

[0619] The following illustrates an exemplary module implementation advertisement 1024 schema that may be used in embodiments and is not intended to be limiting: <xs:element name=“MIA” type=“xxxx:MIA”/> <xs:complexType name=“MIA”> <xs:sequence> <xs:element name=“MSID” type=“xxxx:IDENTIFIER”> <xs:element name=“Comp” type=“xs:anyType”/> <xs:element name=“Code” type=“xs:anyType”/> <xs:element name=“PURI” type=“xs:anyURI” minOccurs=“0”/> <xs:element name=“Prov” type=“xs:string” minOccurs=“0”/> <xs:element name=“Desc” type=“xs:anyType” minOccurs=“0”/> <xs:element name=“Parm” type=“xs:anyType” minOccurs=“0”/> </xs:sequence> <xs:complexType>

[0620] where the elements may include one or more of, but are not limited to:

[0621] MSID—module specification identifier 1022. May uniquely identify the module specification being implemented. In one embodiment, this is a required element.

[0622] Comp—Compatibility. An arbitrary element that may describe the environment in which this module implementation may be executed. Each framework capable of loading and executing the module may have its own requirements on the contents of this element. In one embodiment, this is a required element.

[0623] Code—This arbitrary element may include anything that is needed in addition to the package in order to load and execute the code of this module implementation. In one embodiment, for Java module implementations, this element may include a fully qualified class name containing the module's entry points. In one embodiment, this element may include the entire code.

[0624] PURI—Package URI (uniform resource identifier). This element is a URI that permits the retrieval of a package containing the code of this module implementation. In one embodiment, this is an optional element.

[0625] Prov—Provider. The provider of this module implementation.

[0626] Desc—Description. A string that may be used to describe and search for a module specification. In one embodiment, this is an optional element.

[0627] Parm—Parameter. May include one or more arbitrary parameters that may be interpreted by the module implementation's code.

[0628] The following are descriptions of embodiments of peer advertisements and peer group advertisements that may be used in embodiments of the system and method for describing and identifying abstract software modules in peer-to-peer networking environments.

[0629] In one embodiment, a peer advertisement may be used to describe a peer. A peer advertisement may also describe resources the peer may provide to a peer group. One use of a peer advertisement is to hold specific information about the peer, including one or more of, but not limited to, the peer's name, peer identifier, peer group identifier, descriptive information, and registered services. A peer advertisement may also include endpoint addresses and/or any run-time attributes that individual peer services want to publish (such as being a rendezvous peer for a group). FIG. 6 illustrates the content of a peer advertisement according to one embodiment.

[0630] The following illustrates an exemplary peer advertisement schema that may be used in embodiments and is not intended to be limiting: <xs:element name=“PA” type=“xxxx:PA”/> <xs:complexType name=“PA”> <xs:sequence> <xs:element name=“PID” type=“IDENTIFIER”/> <xs:element name=“GID” type=“IDENTIFIER”/> <xs:element name=“Name” type=“xs:string” minOccurs=“0”/> <xs:element name=“Description” type=“xs:anyType” minOccurs=“0”/> <xs:element name=“Svc” type=“xxxx:serviceParams” minOccurs=“0” maxOccurs=“unbounded”/> <xs:sequence> </xs:complexType>

[0631] where the elements may include one or more of, but are not limited to:

[0632] PID—Peer identifier that may uniquely identify the peer. Each peer may have a unique identifier. In one embodiment, this is a required element.

[0633] GID—The peer group identifier. This element may identify canonically which peer group this peer belongs to.

[0634] Name—A string that may be associated with the peer. In one embodiment, the name may not be required to be unique. In one embodiment, the name may be obtained from a centralized naming service that guarantees name uniqueness. In one embodiment, this is an optional element.

[0635] Description—A string that may be used to index and search for a peer. In one embodiment, the string is not guaranteed to be unique. Two peers may have the same keywords. In one embodiment, this is an optional element.

[0636] Svc—A service element. In one embodiment, any number of service elements may be included. In one embodiment, ach of the service elements may describe the association between a group service which may be denoted by its module class identifier (the value of an MCID (module class identifier) element), and arbitrary parameters encapsulated in a Parm (parameter) element. For example, all accessible endpoint addresses may be published in association with the Endpoint Service Module Class Identifier. The TLS Root certificate may be published under the Peer group Module Class Identifier (There may be a module class identifier for a Peer Group as well). The flag that denotes that this peer is a rendezvous for this group may be published under the Rendezvous Service module class identifier. In one embodiment, each service may be responsible for what is published under its module class identifier. The Service section may also optionally include an element (e.g., “isOff”) that may be used to indicate if this service is enabled or disabled. This element may be used to convey a configuration choice made by the owner of the peer.

[0637] The following is another exemplary embodiment of a peer advertisement in XML, and is not intended to be limiting: <PeerAdvertisement> <Name> name of the peer</Name> <Keywords>search keywords </Keywords> <Pid> Peer identifier </Pid> <Services> < Service advertisement> .... </Service advertisement> </Services> <Endpoints> <endpoint advertisement> .... <endpoint advertisement> </Endpoint> <InitialApp> < Service advertisement> .... </ Service advertisement> </InitialApp> </PeerAdvertisement>

[0638] This embodiment of a peer advertisement may include, but is not limited to, the following fields:

[0639] Name: an optional string that can be associated with a peer. In one embodiment, the name is not required to be unique unless the name is obtained from a centralized naming service that guarantees name uniqueness.

[0640] Keywords: an optional string that may be used to index and search for a peer. In one embodiment, the string is not guarantee to be unique. Two peers may have the same keywords. The keywords string may contain spaces.

[0641] Peer identifier: uniquely identifies the peer. In one embodiment, this may be a required element. Each peer has a unique identifier.

[0642] Service: a service advertisement element for each service published on the peer.

[0643] Services started on a peer may publish themselves to the peer. In one embodiment, not all services running on the peer need to publish themselves.

[0644] Endpoint: an endpoint URI (e.g. tcp://H129.144.36.190:9701 or http://129.144.36.190:9702) for each endpoint available on the peer.

[0645] InitialApp: Optional application/service started when the peer is booted. A service advertisement is used to describe the service.

[0646] In one embodiment, a peer group advertisement may be used to describe, for a peer group, the group specific information (name, peer group identifier, etc.), the membership process, and the available peer group services. The peer group advertisement defines the core set of services to be used by that peer group. In one embodiment, it may not enforce that each peer must run each service locally. Rather it defines the set of services that are made available to the peer group. In one embodiment, a peer group advertisement may be used to describe peer group-specific resources including one or more of, but not limited to, name, group identifier, description, specification, and service parameters.

[0647] In one embodiment, the initial creator of the peer group may define what advertisements go into the peer group advertisement at creation time. Other peers may get a copy of the peer group advertisement when they discover advertisements via the discovery service. In one embodiment, peer group advertisements are immutable objects and new services may not be added due to java binding. Other embodiments may allow new services to be added. In one embodiment, a peer group may provide a registration service that allows the dynamic registration of services.

[0648]FIG. 7 illustrates the content of a peer group advertisement according to one embodiment. The following is an example of one embodiment of a peer group advertisement in XML, and is not intended to be limiting: <peer group advertisement> <Name> name of the peer group</Name> <Keywords>search keywords </Keywords> <Gid> Peer group identifier </Gid <Services> <Service advertisement> ... </Service advertisement> </Services> <initialApp> <Service advertisement> ... </Service advertisement> </InitialApp> </peer group advertisement >

[0649] This embodiment of a peer group advertisement may include, but is not limited to, the following fields:

[0650] Name: an optional name that may be associated with a peer group. In one embodiment, the name is not required to be unique unless the name is obtained from a centralized naming service that guarantee name uniqueness.

[0651] Keywords: an optional string that may be used to index and search for a peer group. In one embodiment, the string is not guarantee to be unique. Two peer groups may have the same keywords.

[0652] Peer group Id: uniquely identifies the peer group. In one embodiment, this is a required element. Each peer group has a unique id.

[0653] Service: a service advertisement element for each peer group service available in the peer group. In one embodiment, not all peer group services need to be instantiated when a peer joins a peer group. In one embodiment, at least a membership service should be available, so the membership service may implement a null authenticator membership.

[0654] InitialApp: optional application/service started when a peer is joining a peer group. A service advertisement may be used to describe the service. The initial application may be started when a peer is joining a group. Alternatively, it may be left to the joining peer to decide to either start or not start the peer group initial application.

[0655] The following illustrates another exemplary peer group advertisement schema that may be used in embodiments and is not intended to be limiting: <xs:element name=“PGA” type=“xxxx:PGA”/> <xs:complexType name=“PGA”> <xs:sequence> <xs:element name=“GID” type=“xxxx:IDENTIFIER”> <xs:element name=“MSID” type=“xxxx:IDENTIFIER”/> <xs:element name=“Name” type=“xs:string” minOccurs=“0”/> <xs:element name=“Desc” type=“xs:anyType” minOccurs=“0”/> <xs:element name=“Svc” type=“xxxx:serviceParam” minOccurs=“0” maxOccurs=“unbounded”/> </xs:sequence> </xs:comptexType>

[0656] where the elements may include one or more of, but are not limited to:

[0657] GID—This element provides the peer group identifier. The peer group identifier is the canonical way of referring to a group and uniquely identifies the peer group.

[0658] MSID—Peer group specification identifier. This designates the module that provides the peer group mechanism for the group. The specification identifier may include an abstraction of that mechanism. This abstraction may be optionally described by a module specification advertisement, and one or more implementations may exist, which may each be described by a module implementation advertisement. In one embodiment, these advertisements may all be searched by peer group specification identifier. In one embodiment, this is a required element.

[0659] Name—A name that may be associated with the peer group. In one embodiment, the name is not required to be unique. In one embodiment, the name may be obtained from a centralized naming service that guarantee name uniqueness. In one embodiment, this is an optional element.

[0660] Desc—This element provides descriptive information that may be used to index and search for a peer group. In one embodiment, the content of this element may not be unique. For example, two peer groups may have the same keywords.

[0661] Svc—Service. In one embodiment, any number of service elements may be included. Each service element may describe the association between a group service denoted by its module class identifier (the value of an MCID element), and one or more arbitrary parameters encapsulated in a Parm element. This optional parameter may only be meaningful to some services. It may be used to configure a service specifically in relation with its use by this group. For example, a simple membership service may find an encrypted password list there. In one embodiment, this is an optional element.

[0662] Once a peer joins a group, that peer may receive (depending again upon membership configuration) a full membership-level peer group advertisement. The full membership advertisement, for example, might include the configuration (required of all members) to vote for new member approval.

[0663] In one embodiment, a pipe advertisement may be used to describe an instance of a pipe communication channel. A pipe advertisement may be used by a pipe service to create associated input and output pipe endpoints. In one embodiment, a pipe advertisement document may be published and obtained using either the core discovery service or by embedding it within other advertisements such as the peer or peer group advertisement. Each pipe advertisement may include an optional symbolic name that names the pipe and a pipe type to indicate the type of the pipe (point-to-point, propagate, secure, etc). FIG. 8 illustrates the content of a pipe advertisement according to one embodiment. The following is an example of one embodiment of a pipe advertisement in XML, and is not intended to be limiting: <PipeAdvertisement> <Name> name of the pipe</Name> <Identifier> Pipe identifier </ Identifier> <Type> Pipe Type </Type> </PipeAdvertisement>

[0664] Embodiments of a pipe advertisement may include, but are not limited to, the following fields:

[0665] Name: an optional name that may be associated with a pipe. In one embodiment, the name is not required to be unique unless the name is obtained from a centralized naming service that guarantee name uniqueness.

[0666] Pipe identifier: uniquely identifies the pipe. In one embodiment, this is a required element. Each pipe has a unique identifier.

[0667] Type: This is an optional pipe type that may be provided to specify the quality of services implemented by the pipe. Pipe types may include, but are not limited to:

[0668] Unicast: messages may not arrive at the destination, may be delivered more than once to the same destination, may arrive in different order.

[0669] Unicast, unsecure, and unreliable. This type of pipe may be used to send one-to-one messages.

[0670] Unicast secure: messages may not arrive at the destination, may be delivered more than once to the same destination, may arrive in different order, but are encrypted (e.g. using TLS). Unicast, secure (e.g. using TLS). This pipe type may be similar or equivalent to the unicast pipe type, except that the data is protected using a virtual TLS connection between the endpoints.

[0671] Propagate: a propagate (one-to-many) pipe. Diffusion pipes. This pipe type is used to send one-to-many messages. Any peer that has enabled an input pipe on a propagate-type pipe may receive messages that are sent on the pipe.

[0672] In one embodiment, a service advertisement may be used to describe a peer-to-peer platform-enabled service. In one embodiment, service advertisements may describe how to activate and/or use the service. In one embodiment, a peer-to-peer platform-enabled service is a service that uses pipes as primary invocation mechanism. To invoke the service, a peer may a message to the associated service pipe. In one embodiment, the core peer group services that each peer group may implement in order to respond to the messages described for the peer-to-peer platform protocols are peer-to-peer platform-enabled services and thus may be published using service advertisements. The service advertisement document may be published and obtained using the peer information protocol for peer services, or alternatively using the peer group discovery protocol for peer group services.

[0673] In one embodiment, a pipe advertisement and access method fields may provide a placeholder for any kind of service invocation schema that defines the valid set of XML messages accepted by the service and the associated message flow. Thus, the peer-to-peer platform protocols may be agnostic of service invocation and interoperate with any existing framework. A service advertisement access method field may refer to a WSDL (e.g. www.w3.org/TR/wsdl), ebXML (e.g. www.ebxml.org), UPnP (e.g. www.upnp.org) or a client-proxy schema, among others. For example, a WSDL access method may define messages that are abstract descriptions of the data being exchanged and the collections of operations supported by the service using a WSDL schema. In one embodiment, a service advertisement may include multiple access method tags, as there may be multiple ways to invoke a service. Thus, the peer may ultimately decide which invocation mechanism to use. For example, small devices may want to use a small-footprint mechanism or a service framework they already have the code for, and larger devices may decide to download a client-proxy code.

[0674] In one embodiment, the access method for services is a schema of valid XML messages accepted by the service. In one embodiment, a service advertisement may contain a URL or URI tag to point to a jar file, DLL, or loadable library. A peer may use this to download the code to run the service, for example if the peer joins the peer group and does not have the required code to run the service.

[0675] One embodiment may provide cross-platform activation of services. A peer may be implemented on a first computing platform. The may discover an advertisement for service that includes platform-independent activation instructions for a service implemented on a second computing platform, different from the first computing platform. The peer may carry out the instructions to activate the service even though their computing platforms are different. For example, a peer implemented on a Macintosh OSX computing platform may activate a search engine for used cars implemented on an Intel Windows computing platform.

[0676]FIG. 9 illustrates the content of a service advertisement according to one embodiment. The following is an example of one embodiment of a service advertisement in XML, and is not intended to be limiting: <ServiceAdvertisement> <Name> name of the Service</Name> <Version> Version identifier </Version> <Keywords>search keywords </Keywords> <Id> Service identifier </Id> <Pipe> Pipe endpoint to access the service </Pipe> <Params> service configuration parameters </Params> <URI> service provider location</URI> <Provider> Service Provider</Provider> <AccessMethods> ... </AcessMethods> <ServiceAdvertisement>

[0677] Embodiments of a service advertisement may include, but are not limited to, the following fields:

[0678] Name: an optional name that may be associated with a service. In one embodiment, the name is not required to be unique unless the name is obtained from a centralized naming service that guarantees name uniqueness.

[0679] Keywords: an optional string that may be used to index and search for a service. In one embodiment, the string is not guaranteed to be unique. Two services may have the same keywords.

[0680] Service Id: uniquely identifies a service. In one embodiment, each service has a unique id. In one embodiment, this element may be required.

[0681] Version: specifies the service version number. In one embodiment, this element may be required.

[0682] Provider: gives information about the provider of the service. This will typically be a vendor name. In one embodiment, this element may be required.

[0683] Pipe: an optional element that specifies a pipe advertisement to be used to create an output pipe to connect to the service. In one embodiment, services are not required to use pipes.

[0684] Params: a list of configuration parameters available to the peer when invoking the service. In one embodiment, the parameter field is optional. Parameters may be defined as a list of strings.

[0685] URI: This is an optional parameter that may be used to specify the location of where the code for the service may be found.

[0686] Access Methods: In one embodiment, at least one access method is required to specify how to invoke the service. Multiple access method tags may be used when multiple access methods are available. The access method tag allows any kind of service invocation representation to be specified. For example the access method may be a placeholder for a WSDL or uPnP document that describes a web service access method.

[0687] In one embodiment, a content advertisement may be used to describe a content document stored somewhere in a peer group. In one embodiment, there are no restrictions on the type of contents that can be represented. A content may be a file, a byte array, code or process state, for example. In one embodiment, each item of content may have a unique identifier also known as its canonical name. The unique identifier may include a peer group universal unique identifier (UUID), and also may include another name that may be computed, parsed, and maintained by peer group members. In one embodiment, the content's name implementation within the peer group is not mandated by the peer-to-peer platform. The name may be a hash code, a URI, or a name generated by any suitable means of uniquely identifying content within a peer group. The entire canonical content name may be referred to as a content identifier or content identifier. FIG. 3 illustrates an exemplary content identifier according to one embodiment.

[0688]FIG. 10 illustrates a content advertisement according to one embodiment. In one embodiment, a size element may be provided for all content items and gives the total size of the content. In one embodiment, the size is in bytes. In one embodiment, the size is a long (unsigned 64-bits). A content advertisement may also include a MIME (Multi-Purpose Internet Mail Extensions) type that describes the MIME type (encoding may be deduced from the type) of the in-line or referenced data. A content advertisement may also include a RefID element. If the advertised content is another advertisement (based upon its type), the RefID is the content identifier of the referenced content. If the advertised content is not another advertisement, the RefID element may be omitted.

[0689] The following is an example of one embodiment of a content advertisement in XML, and is not intended to be limiting: <ContentAdvertisement> <Mimetype> name of the pipe</Mimetype> <Size> Pipe identifier </Size> <Encoding> Pipe Type </Encoding> <identifier> Content identifier</identifier> <RefID> Content identifier </RefID> <Document> document </Document> </ContentAdvertisement>

[0690] Embodiments of a content advertisement may include, but are not limited to, the following fields:

[0691] identifier: in one embodiment, all contents have a unique id.

[0692] Size: the total size of the content. In one embodiment, a long (unsigned 64-bits) represented as a string. “−1” indicates that the size is unknown.

[0693] Mimetype: the mime type of the content. The type may be unknown.

[0694] Encoding: specifies the encoding used.

[0695] RefID: if the advertised content is about another content, the RefID specifies the content identifier of the referenced content.

[0696] In one embodiment, an endpoint advertisement may be used to describe peer transport protocols. In one embodiment, a peer may support one or more transport protocols. In one embodiment, peers may have multiple network interfaces. Typically, there will be one peer endpoint for each configured network interface and/or protocol (e.g. TCP/IP, HTTP). An endpoint advertisement may be included as a tag field in a peer advertisement to describe the endpoints available on the member peer. In one embodiment, an endpoint advertisement document may be published and obtained using either the core discovery service or by embedding it within other advertisements such as the peer advertisement. Each endpoint advertisement may include transport binding information about each network interface or transport protocol. Endpoints may be represented with a virtual endpoint address that may include all necessary information to create a physical communication channel on the specific endpoint transport. For example, “tcp://123.124.20.20:1002” or “http://134.125.23.10:6002” are string representing endpoint addresses. FIG. 11 illustrates the content of an endpoint advertisement according to one embodiment. The following is an example of one embodiment of an endpoint advertisement in XML, and is not intended to be limiting: <EndpointAdvertisement> <Name> name of the endpoint</Name> <Keywords> serach string </Keywords> <Address> endpoint logical address </Address> </EndpointAdvertisement>

[0697] Embodiments of an endpoint advertisement may include, but are not limited to, the following fields:

[0698] Name: an optional name that may be associated with an endpoint. In one embodiment, the name is not required to be unique unless the name is obtained from a centralized naming service that guarantee name uniqueness.

[0699] Keywords: an optional string that may be used to index and search for an endpoint. In one embodiment, the string is not guarantee to be unique. Two endpoints may have the same keywords.

[0700] Peer-to-peer Platform Protocols

[0701] The peer-to-peer platform protocols may be used to provide and support ad hoc, pervasive, and multi-hop peer-to-peer (P2P) network computing. Using the protocols, peers can cooperate to form self-organized and self-configured peer groups independently of their positions in the network (e.g., edges, firewalls, network address translators, public vs. private address spaces, etc.), and without the need of a centralized management infrastructure. The peer-to-peer platform protocols may have very low overhead, make few assumptions about the underlying network transport and limited requirements of the peer environment, and may be used to deploy a wide variety of peer-to-peer applications and services in a highly unreliable and changing network environment.

[0702] In one embodiment, the peer-to-peer platform protocols may standardize the manner in which peers self-organize into peer groups, publish and discover peer resources, communicate, and monitor each other. The peer-to-peer platform protocols may allow the establishment of a virtual network overlay on top of physical networks, allowing peers to directly interact and organize independently of their network location and connectivity. Embodiments of the peer-to-peer platform protocols may be implemented on unidirectional links and asymmetric transports.

[0703] In one embodiment, the peer-to-peer platform may include core protocols including one or more of, but not limited to, a peer membership protocol, a peer discovery protocol, a peer resolver protocol, a peer information protocol, a pipe binding protocol, an endpoint routing protocol, and a rendezvous protocol. In one embodiment, a peer membership protocol may allow a peer to join or leave peer groups, and to manage membership configurations, rights and responsibilities. In one embodiment, a peer discovery protocol may be used to publish and discover resource advertisements. In one embodiment, a peer resolver protocol may be used to send a generic query to one or more peers, and receive a response (or multiple responses) to the query. In one embodiment, a peer information protocol may be used by a peer to obtain status information about another peers. In one embodiment, a pipe binding protocol may be used by a peer to establish a virtual communication channel or pipe between one or more peers. In one embodiment, an endpoint routing protocol may be used by a peer to discover a route (sequence of hops) to send a message to another peer, potentially traversing firewalls and NATs. In one embodiment, a rendezvous protocol may be used for propagating messages within a peer group.

[0704] The core peer-to-peer platform protocols may be implemented using a common messaging layer. This messaging layer binds the protocols to various network transports. In one embodiment, the peer-to-peer platform protocols may be specified as a set of markup language (e.g. XML) messages exchanged between peers. Each software platform binding describes how a message is converted to and from a native data structures such as a Java object or ‘C’ structure. In one embodiment, the use of markup language messages to define protocols allows many different kinds of peers to participate in a protocol. Each peer is free to implement the protocol in a manner best suited to its abilities and role. Peer-to-peer platform messages are described previously in this document.

[0705] In one embodiment, each of the protocols is independent of the others. In one embodiment, a peer may not be required to implement all of the networking protocols. A peer may implement only the protocol that it requires. For example, a device may have all the advertisements it uses pre-stored in memory, so that peer does not need to implement the peer discovery protocol. As another example, a peer may use a pre-configured set of peer routers to route all its messages, hence the peer does not need to implement the peer endpoint protocol. Instead, the peer sends messages to the routers to be forwarded. As yet another example, a peer may not need to obtain or wish to provide status information to other peers, hence the peer does not to implement the peer information protocol. The same can be said about all of the other protocols. In one embodiment, a peer may implement only a portion (client-side or server-side only, for example) of a protocol.

[0706] Peers may use the peer-to-peer platform protocols to advertise their resources and to discover network resources (services, pipes, etc.) available from other peers. Peers may form and join peer groups to create special relationships. The peer-to-peer platform protocols may allow peers to communicate without needing to understand or manage the potentially complex and dynamic network topologies that are becoming common. Peers may cooperate to route messages allowing for full peer connectivity. The peer-to-peer platform protocols allow peers to dynamically route messages across multiple network hops to any destination in the network (potentially traversing firewalls). Each message may include either a complete or a partial ordered list of gateway peers through which the message might be routed. If route information is incorrect, an intermediate peer may assist in dynamically finding a new route. In one embodiment, a peer-to-peer platform protocol message that is routed through multiple hops may not be assumed to be reliably delivered, even if only reliable transports such as TCP/IP are used through all hops. A congested peer may drop messages at any time rather than routing them.

[0707] The peer-to-peer platform protocols may be implemented on a variety of networks including, but not limited to, the Internet, corporate intranets, dynamic proximity networks, home networking environments, LANs and WANs. The peer-to-peer platform protocols may allow the peer-to-peer platform to be easily implemented on unidirectional links and asymmetric transports. In particular, many forms of wireless networking do not provide equal capability for devices to send and receive. The peer-to-peer platform permits any unidirectional link to be used when necessary, improving overall performance and network connectivity in the system. Thus, the peer-to-peer platform protocols may be easy to implement on any transport. Implementations on reliable and bidirectional transports such as TCP/IP or HTTP may provide efficient bidirectional communications. Even on bidirectional transports, communication ability between any pair of peers may at times not work equally well in both directions. That is, communications between two peers will in many cases be able to operate bidirectionally, but at times the connection between two peers may be only unidirectional, allowing one peer to successfully send messages to the other while no communication is possible in the reverse direction. The peer-to-peer platform unidirectional and asymmetric transport also plays well in multi-hop network environments where the message latency may be difficult to predict. Furthermore, peers in a peer-to-peer network tend to have nondeterministic behaviors and thus may appear or leave the network very frequently.

[0708] In one embodiment, the peer-to-peer platform protocols do not require a broadcast or multicast capability of the underlying network transport. Messages intended for receipt by multiple peers (propagation) may be implemented using point-to-point communications. In one embodiment, the peer-to-peer platform protocols may not require periodic messages of any kind at any level to be sent within the network, and thus may not require periodic polling, link status sensing, or neighbor detection messages, and may not rely on these functions from any underlying network transport in the network. This entirely on-demand behavior of the protocols and lack of periodic activity may allow the number of overhead messages generated by the peer-to-peer platform to scale all the way down to near or at zero, when all peers are stationary with respect to each other and all routes needed for current communication have already been discovered.

[0709] In one embodiment, the peer-to-peer platform protocols are defined as idempotent protocol exchanges. The same messages may be sent/received more than once during the course of a protocol exchange. In one embodiment, no protocol states are required to be maintained at both ends. Due to the unpredictability of peer-to-peer networks, assumptions may not be made about the time required for a message to reach a destination peer, and thus in one embodiment the peer-to-peer platform protocols may not impose timing requirements for message receipt.

[0710] The peer-to-peer platform protocols may take advantage of additional optimizations, such as the easy ability to reverse a source route to obtain a route back to the origin of the original route.

[0711]FIG. 12 illustrates protocols and bindings in a peer-to-peer platform according to one embodiment. When the peer-to-peer platform protocols are implemented using a particular programming language and over a particular transport protocol, the implementation is an instance of a peer-to-peer platform binding 220, where the peer-to-peer platform protocols are bound to the language and the transport layer. In one embodiment, protocol and peer software implementation issues may be defined in documents specific to the binding. A binding document describes how the protocols are bound to an underlying network transport (such as TCP/IP or UDP/IP) or to a software platform such as Java 222 or a native software platform 224 such as UNIX.

[0712] The following describes the transport binding of the peer-to-peer platform protocols over TCP/IP including the message wire format of peer-to-peer platform endpoint messages over a TCP/IP socket connection according to one embodiment. Each TCP/IP message may include a header and a body. In one embodiment, the format of the header is:

[0713] Type Source IP address Source Port Size Option Unused

[0714] The type may include information used to either unicast or multicast the request. The type may indicate whether this is a propagate message, a unicast message, an ACK or a NACK. The port may allow each peer to decide to bind its transport service to a specific port number. The TCP binding may not require that a specific port be used. The size may indicate the body size (not including the header). The option may be used to specify the kind of socket connections (uni- or bi-directional) in use. The TCP/IP binding does not require the maintenance of any states. The normal operation is for one peer to send a TCP/IP packet to another one, and to close the socket after the packet is sent. This is the minimum functionality required to implement unidirectional pipes. In one embodiment, if the receiving end decides to keep the connection active (socket “keep alive”), it may return an indicator to the sender to tell the sending end that it is keeping the connection alive. The sending end may reuse the same socket to send a new packet.

[0715] The following describes the transport binding of the peer-to-peer platform protocols over HTTP including the wire message format for the HTTP binding of the peer-to-peer platform protocols. An HTTP request format message may include a header and a body using an HTML format. For example: <HTML> <Code> Header </Code> <Msg> Body </Msg> </HTML>

[0716] The header allows the receiving end to determine which message type is received. Message types may include request succeeded, request failed, empty (no body) and response (the body is not empty and contains data). The body may be represented as a string in the HTML request document. Connection states that may be used include, but are not limited to:

[0717] Peer Connection: Before a message can be sent to a HTTP server peer, the HTTP client may be required to send a request for connection to the other peer. The request for connection message may use the empty header type. The message may be sent using a GET request to the following server URL: http://ip-name:port/reg/client-peerid/. ip-name specifies the IP of the server peer and the port is the corresponding server port number (8080 for example). The server replies with an empty message containing either a request succeeded or request failed header type. The peer connection message may be used to create a client session on the receiving peer. The receiving peer may decide to reject the connection and refuse the client connection. This corresponds to a client registration.

[0718] Message Sending: To send a message to another peer server, the client sends a message of the response type with a message body part. The server replies with an ok or failed message. The message is sent to the following URL using the PUT method: http://ip-name:port/snd/. The server replies with a message including a request succeeded or request failed header type.

[0719] Message Retrieving: To retrieve messages from a peer server, the client may send a GET request message with the empty header tag to the following URL: http://ipname:port/rec/client-peerid/. The server replies with may respond with a message failed message or with a Content message including the messages retrieved.

[0720] Peer Discovery Protocol

[0721] In one embodiment, the peer-to-peer platform may include a peer discovery protocol that may allow a peer to find advertisements on other peers. The peer discovery protocol may be used to discover any published peer resources including other peers, peer groups, pipes, software modules (e.g. services and applications) and any other resource that has an advertisement in the peer-to-peer network. This protocol may be used to find members of any kind of peer group, presumably to request membership. In one embodiment, the peer discovery protocol is the default discovery protocol for all peer groups, including the world peer group. The discovery protocol may be used as a default discovery protocol that allows all peer-to-peer platform peers to understand each other at a very basic level.

[0722] The peer discovery protocol may provide, at the lowest level, the minimum building blocks for propagating discovery requests between peers. Thus, the peer discovery protocol may provide the essential discovery infrastructure for building high-level discovery services. In many situations, discovery information is better known by a high-level service, because the service may have a better knowledge of the topology (firewall traversal), and the connectivity between peers. The peer discovery protocol may provide a basic mechanism to discover advertisements while providing hooks so high-level services and applications can participate in the discovery process. Services may be able to give hints to improve discovery (i.e. decide which advertisements are the most valuable to cache).

[0723] In one embodiment, the peer discovery protocol may be based on web crawling and the use of rendezvous peers. Rendezvous peers are peers that offer to cache advertisements to help others peers discover resources, and propagate requests they cannot answer to other known rendezvous peers. Rendezvous peers and their use in the discovery process are discussed later in this document.

[0724] In one embodiment, custom discovery services may choose to leverage the peer discovery protocol. In one embodiment, if a peer group does not have its own discovery service, the peer discovery protocol may be used as the method for probing peers for advertisements. Rendezvous peers may keep a list of known peers and peer groups. This list may or may not be exhaustive or timely. A custom discovery service (if it knew that the region's rendezvous did keep a timely exhaustive list), for example, may discover all peers in the region by sending a single message to the rendezvous peer.

[0725] In one embodiment, peer discovery may be done with, or alternatively without, specifying a name for the peer to be located and/or the group to which peers belong. When no name is specified, all discovered advertisements of the requested type may be returned. If a probing peer provides the name of the peer to be located, a simple translation may be requested that returns that peer's advertisement. Once a peer is discovered, ping, status, and capability messages may be sent to its “main” endpoint(s) using a peer information protocol. Peers may export more than one endpoint. In one embodiment, each peer designates at least one primary endpoint to handle the low-level housekeeping protocols such as the peer discovery protocol and the peer information protocol.

[0726] In one embodiment, the peer discovery protocol may be used to probe network peer groups looking for peers that belong to specified peer groups. This process may be referred to as screening. Peers may be screened for membership by presenting each candidate member with a peer group name (string matched with the peer group advertisement canonical name). In one embodiment, peers claiming to belong to this group may respond, while other peers do not respond. The peer discovery protocol may be used to discover any type of core advertisement including, but not limited to: peer advertisements, peer group advertisements, pipe advertisements and service advertisements.

[0727] Peer groups need customizable and adaptable discovery policies. In one embodiment, the peer-to-peer platform may be policy-agnostic, and may only provide the basics for discovery. The basics may include one or more core discovery protocols including, but not limited to, a propagate protocol (broadcast within a scope range (subnet or peer group members)), a rendezvous protocol (unicast to a trusted discovery peer) and an invite protocol (reverse discovering).

[0728] A discovery policy may be implemented in a discovery service based on the core discovery protocol. In one embodiment, a discovery service in the core peer-to-peer platform may be used to discover abstractions and/or entities in the peer-to-peer network including, but not limited to, peers, peer groups, peer group policies (group defined services) and pipe endpoints.

[0729] In some embodiments of a peer-to-peer platform, the discovery service may rely on trusted peers (discovery proxies). The discovery service may leverage local neighbors (local propagate). The discovery service may use rendezvous peers (indexes). The discovery service may leave traces in discovery proxies (cache). The discovery service may use net crawling as a last resort (propagate between trusted discovery proxies). In one embodiment, a discovery service may not discover some entities in the peer-to-peer network including, but not limited to, content (large scale; in one embodiment, a content management service may be used for content discovery), metadata (maintain relationship between data), users, and applications.

[0730] Embodiments of a peer-to-peer platform discovery service may leverage surrounding peers and peer groups, provide meetings points for far away peers and groups, use an asynchronous protocol and provide reverse discovery. In one embodiment, the discovery service may be used to find new neighbor peers and provide the ability for a peer to learn about other peer's abilities. Embodiments of a discovery service in the peer-to-peer platform may provide extensibility, spontaneous configuration, adaptive connectivity, a dynamic (i.e. no fixed) network topology, and the ability to reach the “edge of the Internet” (firewall, and NAT).

[0731] Some embodiments of a discovery method in the peer-to-peer platform may not require centralized naming (e.g. no DNS). In one embodiment, a discovery service may provide predefined meeting points that may be used in platform bootstrapping. In one embodiment, the discovery service may support a dynamic environment (peers may come and go). In one embodiment, the discovery service may support an unreliable environment (peers may fail). In one embodiment, the discovery service may help to adapt to a changing environment through viral behavior. In one embodiment, the discovery service may be used to improve performance as a system ages (increase locality). In one embodiment, the discovery service may be used in support of security (change of physical location). In one embodiment, a discovery service may be used that provides administrationless discovery (zero-admin).

[0732] Embodiments of the peer-to-peer platform discovery service may allow a peer to learn about other peers that discover it. In one embodiment, the peer-to-peer platform discovery service may provide application-managed rendezvous. In one embodiment of the peer-to-peer platform, a peer discovery protocol may support a discovery query message and a discovery response message to be used in the peer discovery process.

[0733] Peer groups need customizable and adaptable discovery policies. One approach to implementing a discovery policy is to start simple and build more complex policies. Embodiments of the peer-to-peer platform discovery service may support discovery methods including, but not limited to:

[0734] Propagate Discovery

[0735] Unicast to predefined rendezvous

[0736] Leverage transport dependent multicast (e.g. IP)

[0737] Unicast Discovery

[0738] Unicast to known rendezvous for forward propagation

[0739] May be used for reverse Discovery

[0740] In one embodiment, the peer-to-peer platform may not mandate exactly how discovery is done. Discovery may be completely decentralized, completely centralized, or a hybrid of the two. Embodiments of the peer-to-peer platform may support discovery mechanisms including, but not limited to:

[0741] LAN-based discovery. This is done via a local broadcast over the subset.

[0742] Discovery through invitation. If a peer receives an invitation (either in-band or out-of-band), the peer information contained in the invitation may be used to discover a (perhaps remote) peer.

[0743] Cascaded discovery. If a peer discovers a second peer, the first peer may, with the permission of the second peer, view the horizon of the second peer to discover new peers, groups, and services.

[0744] Discovery via rendezvous points. A rendezvous point is a special peer that keeps information about the peers it knows about. A peer that can communicate via a rendezvous peer, for example via a peer-to-peer protocol pipe, may learn of the existence of other peers. Rendezvous points may be helpful to an isolated peer by quickly seeding it with lots of information. In one embodiment, a web site or its equivalent may provide information of well-known peer-to-peer protocol rendezvous points.

[0745] In one embodiment, a peer-to-peer platform web of trust may be used. In a web of trust, a peer group creator may select initial discovery proxies, and may delegate to new peer members. Any peer, when trusted, can become a discovery proxy. Discovery proxies may propagate requests between each other for net-crawling discovery. New peers may be untrusted or low-trust peers, and may be typically difficult to find and have limited discovery range (this may help protect against misbehaviors and denial of service attacks). Trusted members are easier to discover. Peers may increase their discovery range as they become more trusted (discovery credential). Some peers may not need to discover beyond their initial net peer group range.

[0746] In one embodiment, a peer may go through a proximity network, which also may be referred to as a subnet or region, to try to find (discover) surrounding peers. The Internet includes the concept of subnets that are physically defined by physical routers that define regions in which computer systems are connected to one another. Within one of these regions, the peer-to-peer protocol uses multicast or other propagate mechanism to find peers. In one embodiment, a propagate discovery mechanism may be provided where one peer can propagate a discovery request through a local subnet. Peers that are in the subnet may respond to the discovery request. The propagate discovery mechanism may provide primarily close range discovery. In one embodiment, only peers that are in the same physical subnet (region) may respond. “Propagate” is at the conceptual level. Multicast is implemented by TCP/IP to provide propagate capabilities. Other transports may use other methods to implement propagate. For example, Bluetooth provides a different implementation of propagate which is not multicast.

[0747] The core discovery protocol may provide a format for a local peer to send a propagate message (a request to find information about other peers or peer groups in its local region or subnet) and a format for a response message. A propagate may ask who is there (what peers are in the subnet). One or more peers may decide to respond. Other peers on the subnet may choose not to respond if they do not want to be discovered by the requesting peer. The response message may indicate that a peer is there and that the requesting peer may communicate with it if it wants more information. In one embodiment, the core peer-to-peer platform may define the format of the discovery requests and responses as part of the peer discovery protocol. In one embodiment, the messages may be XML messages.

[0748] One embodiment of a peer-to-peer platform may provide a bootstrapping process for peers. In one embodiment, a new peer may not know any peers or peer groups when bootstrapped. When bootstrapping, the peer may issue a peer discovery propagate. message. The new peer is looking for one or more peers in the subnet. The new peer needs to reach some level of connectivity in order to support higher-level operations. From discovered peers, the new peer may acquire information needed to allow the new peer to go further in its bootstrapping process. For example, the new peer may send messages to another peer requesting information on services that the other peer may be aware of that the new peer needs for bootstrapping.

[0749] When the new peer discovers another peer or peers, it may attempt to discover peer groups. This process may be similar to the peer discovery process described above. The new peer may send (e.g. propagate) another discovery message that is configured to discover peer groups. Peers in the proximity network (region) that are aware of a peer group or peer groups may respond to the peer group discovery message, and may return information on the peer group(s) (e.g. peer group advertisements) of which they are aware. The new peer may use this information to determine a peer group or peer groups that it may be interested in joining.

[0750] In one embodiment, a peer group may be configured so that only a subset of peers within a group may have the capabilities to respond to peer group discovery messages and to provide information about the peer group to inquiring peers.

[0751] Peer and peer group discovery may both be implemented by the peer discovery protocol. Peer and peer group discover are more or less at the same level in the peer-to-peer platform. In one embodiment, peer discovery may use a message that indicates the discovery is looking for peers, and peer group discovery may use a similar message that indicates the discovery is looking for peer groups.

[0752] In one embodiment, the peer discovery protocol may be required to be implemented in a peer platform, and thus all peers will have the service running. When one peer sends (e.g. propagates) a request, then a receiving peer must send a response, unless it is configured to not respond to at least some requests from at least some peers based upon configuration parameters. In another embodiment, peers may be implemented without the peer discovery protocol. In other words, in this embodiment, peers are not required to implement the peer discovery platform. For example, on some smart devices, peer information and/or peer group information may be preconfigured into the device, and so bootstrapping may be performed on these devices without having to initiate a peer discovery.

[0753] Embodiments of the peer-to-peer platform may implement a discovery mechanism that is more suited for long-range discovery than the propagate method described above. In one embodiment, rendezvous peers may be used in discovery. A rendezvous peer may be described as a meeting point where peers and/or peer groups may register to be discovered, and may also discover other peers and/or peer groups, and retrieve information on discovered peers and/or peer groups. In one embodiment, a peer (any peer) in a peer group may decide to become or may be appointed or elected as a rendezvous peer in the group. The rendezvous peer may be advertised as a meeting point, and may be predefined on peers so that, for example, the peers, when starting up, may know to go to the rendezvous peer to find information about the peer-to-peer network. Rendezvous peers may act as information brokers or centralized discovery points so that peers can find information in an easy and efficient manner. As a peer group grows, a peer may become a rendezvous peer in the group. In one embodiment, a network of rendezvous peers may be constructed that may help to provide long-range discovery capabilities. A rendezvous peer may be aware of at least some of the other rendezvous peers in the network, and a discovery message from a peer may be forwarded from a first rendezvous peer to a second, and so on, to discover peers and/or peer groups that are “distant” on the network from the requesting peer.

[0754] Rendezvous peers may offer to cache advertisements to help others peers discover resources, and may propagate (forward) requests they cannot answer to other known rendezvous peers. In one embodiment, a rendezvous peer implements at least one of these two functions. The services provided by a rendezvous peer may be different than message routing. Message routing is performed at a lower level involving multi-hops connections to send a message between any peers in the network. In one embodiment, the forwarding of a request between two rendezvous peers may involve routing to propagate a request between two rendezvous, but this is transparent to the rendezvous service and done underneath.

[0755] In one embodiment, rendezvous peers may forward requests between each other. A rendezvous may be typically connected to a few other rendezvous peers. There may be as many rendezvous peers as peers in a peer group. Not every peer may be a rendezvous (e.g. if a peer has no caching capabilities or is isolated behind a firewall). In one embodiment, only rendezvous peers may forward. a discovery request to another rendezvous peer. This restriction may serve to limit and control the exponential growth of request propagations within the network. Rendezvous peers may thus provide a simple throttle mechanism to control the propagation of requests. In one embodiment, sophisticated rendezvous peers may be deployed to filter and distribute requests for the best usage of network resources.

[0756] In one embodiment, a peer may be pre-configured with a pre-defined set of rendezvous peers. These bootstrapping rendezvous may help the peer discover enough network resources (peers, rendezvous, services) as it needs to support itself. In one embodiment, the pre-configured rendezvous are optional. A peer may be able to bootstrap by finding rendezvous or enough network resources in its proximity environment. If a peer does not know the information, it may ask the surrounding peers (hop of 1) if they know the answer. One or more peers may already have the answer. If no surrounding peers know the answer, the peer may ask its rendezvous peers to find advertisements. Peers are recognized as rendezvous peers in their peer advertisements. When a peer discovers a new peer, it can determine if this peer is a rendezvous. A peer may not be required to use all the rendezvous peers that it has discovered.

[0757] Rendezvous peers may forward requests between themselves. The discovery process continues until one rendezvous peer has the answer or the request dies. There is typically a Time To Live (TTL) associated with the request, so it is not infinitely propagated. As an example, suppose a peer A is attempting to discover a resource R on the network. Peer A issues a discovery request specifying the type (peer, peer group, pipe, service) of advertisements it is looking for. To initiate the Discovery, peer A sends a discovery request message as a single propagate packet to all its available endpoints. The packet may contain the requested peer advertisement, so the receiving peer can respond to the requester. Each discovery request identifies the initiator, and a unique request identification specified by the initiator of the request. When another peer receives the discovery request (assume peer B in this example), if it has the requested R advertisement, it will return to peer A the advertisement for R in a discovery response message. If Peer A does not get response from its surrounding peers (hop of 1), Peer A may send the request to its known rendezvous peers. If the rendezvous peers do not have the advertisement, they can propagate the request to all other rendezvous peers they know. When a rendezvous receives a respond to a request, the rendezvous may cache the R advertisement for future usage, before sending it to the requester.

[0758] In one embodiment, the peer rendezvous capabilities may be embedded in the core discovery protocol of the peer-to-peer platform. Rendezvous peers may be protocol-based, and may broker more information than name servers that typically only broker names of entities. In one embodiment, a rendezvous peer may maintain indexes for entities in the peer-to-peer platform including peers, peer groups, and advertisements. Indexes may be dynamic indexes which may grow as the peer group community grows and more peers join. As a group joins, some peers may decide to become rendezvous peers to help peers connect with other peers in the group.

[0759] The rendezvous peer is at the peer level. A rendezvous peer is not a “service”. A rendezvous peer may be used as part of an infrastructure to construct services such as a DNS or other centralizing and index services. In one embodiment, services may interact with a rendezvous peer to obtain and/or manipulate information stored on the rendezvous peer to perform some task to make the system act more efficiently.

[0760] In a network of peers, some peers may elect themselves, through the discovery protocol, to become rendezvous peers. A rendezvous peer may act as a broker or discovery message router to route discovery messages to the right place. In other words, a rendezvous may act to route discovery requests to the right rendezvous peers. For example, a rendezvous peer may receive a message requesting information about peers that are interested in baseball. The rendezvous peer may know of another rendezvous peer that specializes in information about baseball. The first rendezvous peer may forward or route the message to the second rendezvous peer. In one embodiment, rendezvous peers may maintain connections to other rendezvous peers in order to provide discovery and routing functionality.

[0761] Rendezvous peers may support long-range discovery. For example, a first peer is at a remote location from a second peer. For one of these peers to find the other with a mechanism such as web crawling may be time consuming, since there maybe a lot of “hops” between the two peers. Rendezvous peers may provide a shortcut for one of the peers to discover the other. The rendezvous peer, thus, may serve to make the discovery process, in particular long-range discover, more efficient.

[0762] A peer-to-peer network may be dynamic. Peers and peer groups can come and go. Dynamic identifiers (addresses) may be used. Thus, routes between peers need to be dynamic. Rendezvous peers may provide a method for route discovery between peers that allows routing in the peer-to-peer network to be dynamic. In this method, the rendezvous peers may perform route discovery for peers when the peers send discovery messages to the rendezvous peers or when a peer is attempting to connect to another peer or peer group that is not in the local region of the peer. This method may be transparent to the requesting peer.

[0763] In one embodiment, the rendezvous peers may be able to cache advertisements. An advertisement may be defined as metadata or descriptions of a resource. An advertisement may include information necessary for an entity to connect to or use the resource, for example a service advertisement may include information for connecting to and using the service. Advertisements may be published to allow other entities to discover them. The rendezvous peer may provide the ability for services and applications to store and cache temporary, e.g. via a lease mechanism, advertisements. This may used, for example, when one service needs to connect to another service, and needs the pipe endpoint or communication channel that may be used to connect to the service. The pipe endpoint may be included in a service advertisement published on a rendezvous peer. Thus, in one embodiment, the rendezvous peer provides the ability for peers, peer groups, services and applications to advertise pipe endpoints and to discover pipe endpoints of services and applications.

[0764] In one embodiment, the rendezvous protocol may use an index cache (e.g. on a peer serving as a rendezvous proxy). FIG. 13 illustrates discovery through a rendezvous peer according to one embodiment. Rendezvous proxy 206 may cache peer 200 and peer group 210 information for peer groups 210A and 210B. Peers 200 in each peer group 210 may then discover each other through rendezvous proxy 206. Rendezvous proxy 206 may itself be a peer and may be a member in one or more peer groups 210. In one embodiment, access to rendezvous proxies 206 may be restricted to peers with rendezvous access privileges. In this embodiment, non-trusted peers (peers without access privileges) may access rendezvous proxies 206 through trusted peers 200 within their peer group 210, or alternatively through other local peers in other peer groups. In one embodiment, the rendezvous protocol may be used across subnets (configurable at the peer group level). In one embodiment, the rendezvous protocol may be used across/through firewalls (e.g. gateways).

[0765] In one embodiment, the peer-to-peer platform may include a propagate policy for use in discovery. FIG. 14 illustrates discovery through propagate proxies according to one embodiment. In one embodiment, discovery proxy 208 may control propagation of discovery messages. In FIG. 14, discovery proxy 208 may receive discovery messages from peers 200 in peer group 210A and propagate the messages to peers in other groups such as peer group 210B. In one embodiment, access to discovery proxies 208 may be restricted to peers with discovery proxy access privileges. In this embodiment, non-trusted peers (peers without access privileges) may access discovery proxies through trusted peers 200 within their peer group 210, or alternatively through other local peers in other peer groups. In one embodiment, propagation may be controlled using TTL (time to live). In another embodiment, propagation may be controlled using message counts. In one embodiment, the propagate policy may be used for subnet TCP/multicast (platform configurable). In one embodiment, the propagate policy may support HTTP gateways (platform configurable). In one embodiment, the propagate policy may be used through. firewalls (e.g. need peer activation behind firewalls).

[0766] In one embodiment, the peer-to-peer platform may include an invite policy. In one embodiment, the invite policy may support the adding of new peers and peer groups (e.g. publish advertisements).

[0767] In one embodiment, the peer-to-peer platform may allow the persistent local peer caching of discovery information. In this embodiment, a peer may be allowed to cache advertisements discovered via the peer discovery protocol for later usage. Caching may not be required by the peer-to-peer platform, but caching may be a useful optimization. The caching of advertisements by a peer may help avoid performing a new discovery each time the peer is accessing a network resource. In a highly transient environment, performing the discovery may be necessary. In a static environment, caching may be more efficient.

[0768] In one embodiment, the peer-to-peer platform may support trusted discovery peers. In one embodiment, the peer-to-peer platform may use discovery credentials. In one embodiment, the peer-to-peer platform may allow credential delegation. In one embodiment, the peer-to-peer platform may support propagate proxies. In one embodiment, a propagate proxy may support TTL/message counts. TTL stands for Time To Live (how long the request lives in the system). In one embodiment, a propagate proxy may support net crawling. In one embodiment, a propagate proxy may provide “smart above” routing.

[0769] In one embodiment, a peer may not initiate a new discovery request until the minimum allowable interval between discoveries is reached. This limitation on the maximum rate of discoveries may be similar to the mechanism required by Internet nodes to limit the rate at which ARP requests are sent for any single target IP address. The maximum rate may be defined by each specific implementation transport bindings and exported to the application.

[0770]FIG. 15 illustrates using messages to discover advertisements according to one embodiment. A message or messages may be used to get all known, reachable advertisements within a region on the network. In one embodiment, this list may not be guaranteed to be exhaustive, and may be empty. Named peers may also be located using the peer discovery protocol. A message may include a peer group credential of the probing (requesting) peer that may identify the probing peer to the message recipient. The destination address may be any peer within a region (a propagate message 230) or alternatively a rendezvous peer (a unicast message 232). The response message 234 may return one or more advertisements (e.g. peer advertisements and/or peer group advertisements) that may include “main” endpoint addresses which may be converted to a string in the standard peer endpoint format (e.g. URI or URL) and also may include a network transport name.

[0771] In one embodiment, the peer discovery protocol may not guarantee peers that receive a query will respond to the query, nor does it mandate that the number of advertisements requested will be honored. In this embodiment, a best effort is made at matching the query to results in the respondent's cache. In one embodiment, the peer discovery protocol does not guarantee that a response to a discovery query request will be made. In one embodiment, responding to a discovery query request is optional. A peer may not be required to respond to a discovery query request.

[0772] In one embodiment, the peer discovery protocol does not require a reliable transport. Multiple discovery query requests may be sent. None, one, multiple pr redundant responses may be received. In one embodiment, the peer discovery protocol may utilize the resolver protocol to route queries and responses. The tasks of propagating and re-propagating a query to the next set of peers may be delegated to the resolver service.

[0773] In one embodiment, a peer may receive a discovery response that is not a response to any discovery query initiated by the peer. This mechanism may provide the ability to remote publish a resource. In one embodiment, he peer discovery protocol may provides a mechanism for services to query the network for peer-to-peer resources and receive responses. In one embodiment, the peer discovery protocol may be used to take care of some or all messaging aspects, caching, and expiring advertisements.

[0774] In one embodiment, a discovery query message may be used to send a discovery request to find advertisements (e.g. for peers or peer groups). The discovery query may be sent as a query string (attribute, value) form. A null query string may be sent to match any results. A threshold value may be included to indicate the maximum number of matches requested by a peer. The following is an example of one embodiment of a discovery query message in XML, and is not intended to be limiting: <DiscoveryQuery> <Credential> Credential </Credential> <QueryID> query id</QueryID> <Type> request type (e.g. PEER, PEER GROUP, PIPE, SERVICE, CONTENT) </Type> <Threshold> requested number of responses </Threshold> <PeerAdv> peer advertisement of requestor </PeerAdv> <Attribute> attribute </ Attribute> <Value> value </Value> </DiscoveryQuery>

[0775] Embodiments of a discovery query message may include one or more of, but are not limited to, the following fields:

[0776] Credential: The credential of the sender.

[0777] QueryID: Query identifier.

[0778] Type: specifies which advertisements are returned.

[0779] Threshold: specifies the maximum number of advertisements that each responding peer should provide. The total number of results received may depend on the number of peers that respond and the advertisements they have. In one embodiment, if <Type> indicates peer advertisements and <Threshold> is a particular value (e.g. 0) then the query is to collect peer advertisements of respondents. Therefore, any peer should respond to such a query, even though no results are to be included.

[0780] PeerAdv: if present, peer advertisement of the requester.

[0781] Attribute: specifies the query attribute.

[0782] Value: specifies the query value.

[0783] In one embodiment, the value is only present if the attribute is present. Both the attribute and value may be omitted. In one embodiment, both attribute and value must either both be present or absent. In one embodiment, if attribute and value are absent, then each respondent may supply a random set of advertisements of the appropriate type up to <Threshold> count.

[0784] In one embodiment, only advertisements including an element with a name matching <Attribute> and that also includes a value matching <Value> are eligible to be found. In one embodiment, <Value> may begin and/or end with an indicator such as a special character (e.g. “*”). This indicates that <Value> will match all values that end with or beginning with, or contain the rest of the string. If <Value> includes only the indicator (e.g. “*”), the result may be unspecified. Some implementations may choose not match any advertisement for a <Value> including only the indicator.

[0785] In one embodiment, a discovery response message may be used to send a discovery response message to answer a discovery query message. The following is an example of one embodiment of a discovery response message in XML, and is not intended to be limiting: <DiscoveryResponse> <Credential> Credential </Credential> <QueryId> query id</QueryId> <Type> request type (e.g. PEER, GROUP, PIPE, SERVICE, CONTENT) </Type> <PeerAdv> peer advertisement of the respondent </PeerAdv> <Attribute> Attribute </Attribute> <Value> value </Value> <Count> count </Count> <Responses> (peer, peer group, pipe, service or content advertisement response) </Responses> <............> <Responses> (peer, peer group, pipe, service or content advertisement response) </Responses> </DiscoveryResponse>

[0786] Embodiments of a discovery response message may include one or more of, but are not limited to, the following fields:

[0787] Credential: The credential of the sender.

[0788] QueryID: Query identifier.

[0789] Type: The type of the advertisements returned in the <Response> element(s).

[0790] Count: If present, the number of <Response> element(s) included in this response message.

[0791] PeerAdv: If present, the advertisement of the respondent. May include an expiration attribute that indicates the associated relative expiration time in milliseconds.

[0792] Attribute: specifies the query attribute.

[0793] Value: specifies the query value.

[0794] Responses: advertisement responses. The advertisements may be, for example, peer, peer group, pipe, content or software module (e.g. service) advertisements. In one embodiment, each may include an Expiration attribute that indicates an associated relative expiration time in milliseconds.

[0795] In one embodiment, the value tag is only present if the Attribute tag field is present. Both the Attribute and Value tag may be omitted.

[0796] In one embodiment, if an advertisement document (e.g. an XML document) is embedded into another document (e.g. XML document), the document separators must be dealt with. For XML documents, his may be done using the standard XML escaping rules. For example, ‘<’ becomes ‘&lt;’ ‘>’ becomes ‘&gt;’ and ‘&’ becomes ‘&amp’.

[0797] Reverse Discovery

[0798] Reverse discovery means that, in a peer-to-peer network, when a first entity (e.g. a peer) discovers a second entity (e.g. another peer), the second entity may also discover the first entity from the discovery initiated by the first entity. This may also be referred to as “mutual discovery”. In most traditional systems, discovery is typically one-directional. In the peer-to-peer world, reverse discovery is important because, by definition, all “peers” are equal (i.e. it is typically not a hierarchical system). In one embodiment, there may be different levels of discovery for peers. For example, a peer may be configured to remain anonymous when discovering other peers or to always support reverse discovery. In one embodiment, a peer initiating a discovery may also be configured to deny discovery to another peer if the other peer is configured or chooses to remain anonymous. In one embodiment, a peer may also be configured to or may choose to deny discovery by other peers that wish to remain anonymous.

[0799] Invitations

[0800] One embodiment of the discovery protocol may also provide methods by which a peer can “advertise” itself, for example when joining a peer-to-peer network. For example, a peer may send an email message, by telephone, by “traditional” mail, or by other methods to other peers it discovers or is preconfigured to know about to advertise its presence and willingness to be contacted by other peers. This is done outside of the discovery method, and may be performed by any external medium. A peer who receives an invitation from a peer may have a capability to add or enter the new peer to a list or database of peers that it knows about. When the peer later restarts, these peers may be among the preconfigured peers that the peer knows about. In one embodiment, a peer may have a “notify” or “invitation” interface to allow a user to initiate invitations. In one embodiment, the peer-to-peer platform may provide import and export capabilities for invitations. In one embodiment, the invitations may be implemented as documents external to the peer-to-peer system that may be exported from one peer and imported into another peer. In one embodiment, the invitations may be in a format that enables the exporting and importing. In one embodiment, the invitations may be in XML format. In one embodiment, an interface may be provided to allow the manual entering of invitation information. Importing the invitation may create a peer-to-peer platform document that may then be used by the peer. The format of exported documents may depend on the platform on which the peer is implemented.

[0801] Rendezvous Protocol

[0802] One embodiment may include a rendezvous protocol that may be responsible for propagating messages within a peer group. While different peer groups may have different means to propagate messages, the rendezvous protocol defines a protocol that enables peers to connect to services (propagate messages to other peers and receive propagated messages from other peers) and to control the propagation of messages (TTL, loopback detection, etc.).

[0803] One embodiment may include a rendezvous advertisement that may be used to describe a peer that acts as a rendezvous peer for a given peer group. Rendezvous advertisements may be published and retrieved, so that peers that are looking for rendezvous peers can find them. In one embodiment, a rendezvous advertisement may include a name element that may be associated with the rendezvous peer. This may be the peer name. In one embodiment, the name element is optional. In one embodiment, a rendezvous advertisement may include a rendezvous group identifier element that includes the peer-to-peer platform identifier of the peer group for which the peer is a rendezvous. In one embodiment, this element is required. In one embodiment, a rendezvous advertisement may include a rendezvous peer identifier element that may include the peer-to-peer platform identifier of the rendezvous peer. In one embodiment, this element is required.

[0804] Rendezvous peers may be used to re-propagate messages they have received. A peer may dynamically become a rendezvous peer and/or may dynamically connect to a rendezvous peer. In one embodiment, the connection between a peer and a rendezvous peer may be achieved by an explicit connection, associated to a lease. In one embodiment, this connection may be performed by sending messages using the endpoint protocol. Each rendezvous protocol may be listening on an endpoint address with a service name and service parameter (e.g. peer group identifier).

[0805] In one embodiment, one or more queries and responses may be defined by the rendezvous protocol in order to establish connections. A lease request may be sent by a peer that desires to connect to a given rendezvous. In one embodiment, the lease request may not include an indication of the amount of the lease; the rendezvous will give whatever amount it determines is appropriate. In one embodiment, a rendezvous that grants a lease may return a lease granted message. This message is sent by a rendezvous that is granted a lease to a given client. The amount of time the lease is granted may be included in the message. In one embodiment, a lease may be canceled by either party at any time if necessary or desired. A lease cancel request may be sent by a client to a rendezvous in order to cancel an existing lease. The rendezvous may reply with a lease cancelled message.

[0806] In one embodiment, the peer resolver protocol resides on top of the rendezvous protocol. In this embodiment, the peer resolver protocol is not used to send these messages. In one embodiment, the rendezvous protocol may reside on top of the endpoint routing protocol, which may be used to send rendezvous protocol messages.

[0807] In one embodiment, the rendezvous protocol is responsible for controlling the propagation of messages. In one embodiment, the rendezvous protocol may propagate a message unless of the following conditions is detected:

[0808] Loop: if a propagated message has already been processed on a peer, it is discarded.

[0809] TTL: propagated messages are associated with a Time To Live (TTL). Each time a propagated message is received on a peer, its TTL is decreased by one. When the TTL of a message drops to zero, the message is discarded.

[0810] Duplicate: each propagated message is associated with a unique identifier. When a propagated message has been duplicated, and has already been received on a peer, duplicates are discarded.

[0811] In one embodiment, propagation control may be performed by embedding a message element within each propagated message that may include one or more of, but is not limited to, the following elements: a message identifier, a destination name, a destination parameter, a TTL, and a path.

[0812] In one embodiment, when a peer wants to connect to a Rendezvous Peer, it sends a lease request message with a connect message element which includes its peer advertisement. When a rendezvous peer grants a lease, it sends a lease granted message to the source of the lease request. In one embodiment, a lease granted message may include one or more of, but is not limited to, the following elements:

[0813] A connected lease element that includes (e.g. in a String representation) the time in milliseconds the lease is granted for. In one embodiment, this is a required element.

[0814] A connected peer element that includes the peer identifier of the rendezvous peer that has granted the lease. In one embodiment, this is a required element.

[0815] A rendezvous advertisement reply element that includes the peer advertisement of the rendezvous peer that grants the lease. In one embodiment, this is an optional element.

[0816] In one embodiment, when a peer desires to cancel a lease, it sends a lease cancel request with a disconnect message element that includes the peer advertisement of the peer which is requesting to cancel the lease.

[0817] Peer Resolver Protocol

[0818] In one embodiment, the peer resolver protocol may be used to disseminate generic queries to one or multiple handlers within a peer group and identify matching responses. Each query may be addressed to a specific handler name. In one embodiment, this handler name may define the particular semantics of the query and its responses, but is not associated with any specific peer. A given query may be received by any number of peers in the peer group, possibly all, and processed according to the handler name if such a handler name is defined on that peer. In one embodiment, the peer resolver protocol may provide a generic query/response infrastructure for building high-level resolver services. In many situations, a higher-level service may have a better knowledge of the group topology. In one embodiment, the peer resolver protocol may use a rendezvous service to disseminate a query to multiple peers or unicast messages to send queries to specified peers.

[0819] In one embodiment, the peer resolver protocol may allow a peer to send simple, generic search queries to one or more peer services. In one embodiment, only those peers that have access to data repositories and that offer advanced search capabilities typically implement this protocol. Each service may register a handler in the peer group resolver service to process resolver query requests. Resolver queries may be demultiplexed to each service. Each service may respond to a peer via a resolver response message. It is important to point the differences between the peer discovery protocol and the peer resolver protocol. The peer discovery protocol is used to search for advertisements to bootstrap a peer, and discover new network resources. The peer resolver protocol is a generic service that services query protocols. The peer resolver protocol may be used by a service on a peer to interact with a service on another peer.

[0820] The peer resolver protocol may enable each peer to send and receive generic queries to find or search for peer, peer group, pipe or service specific information such as the state of a service or the state of a pipe endpoint. In one embodiment, each resolver query may have a unique service handler name to specify the receiving service, and a query string to be resolved by the service. In one embodiment, the peer resolver protocol may provide a generic mechanism for peers to send queries and receive responses. In one embodiment, the peer resolver protocol may remove the burden for registered message handlers by each service and set message tags to ensure uniqueness of tags. In one embodiment, the peer resolver protocol may be used to take care of some or all messaging aspects, caching queries and responses and forwarding queries, based on the invoker's decision. In one embodiment, the peer resolver protocol may ensure that messages are sent to correct addresses and peer groups. In one embodiment, the peer resolver protocol may perform authentication and verification of credentials and the dropping of rogue or incorrect messages.

[0821]FIG. 16 illustrates one embodiment of using peer resolver protocol messages between a requesting peer 200A and a responding peer 200B. A resolver query message 236 may be used to send a resolver query to a named handler on one or more peers 200 that are members of the peer group. In one embodiment, a resolver query message 236 may be used to send (unicast) a resolver query request to a service on another member 200B of a peer group. In one embodiment, the resolver query may be sent as a query string to a specific service handler. In one embodiment, each query has a unique identifier. The query string may be any string that may be interpreted by the targeted service handler. A resolver response message 238 may be sent (unicast) to the requesting peer 200A by the service handler. The following is an example of one embodiment of a resolver query message in XML, and is not intended to be limiting: <ResolverQuery> <Credential> Credential </Credential> <HandlerName> name of handler </HandlerName> <SrcPeerID> source peer identifier </SrcPeerID> <QueryID> incremental query identifier </QueryID> <Query> query string </Query> </ResolverQuery>

[0822] Embodiments of a resolver query message may include, but are not limited to, the following fields:

[0823] Credential: The credential of the sender

[0824] HandlerName: service the query needs to be passed

[0825] SrcPeerID: The identifier of the peer originating the query (e.g. a URN)

[0826] Queryld: Query identifier

[0827] Query: query string

[0828] A resolver response message may be returned in response to a resolver query message. The following is an example of one embodiment of a resolver response message in XML, and is not intended to be limiting: <ResolverResponse> <Credential> Credential </Credential> <HandlerName> name of handler </HandlerName> <QueryID> query identifier </QueryID> <Response> response </Response> </ResolverResponse>

[0829] Embodiments of a resolver response message may include, but are not limited to, the following fields:

[0830] Credential: The credential of the respondent

[0831] QueryID: Query identifier of the query to which this is a response

[0832] HandlerName: Specifies how to handle the response; e.g. service the query needs to be passed to

[0833] Response: response string including the response(s)

[0834] In one embodiment, the peer resolver protocol communicates by exchanging endpoint messages. Endpoint addresses specify a handler name. The peer resolver protocol attaches a listener by that name to the endpoint service.

[0835] In one embodiment, peer resolver protocol implementations may use the same scheme for building their handler names. The convention used by all services of the world peer group may use the concatenation of the service name, the peer group identifier, and a value unique within the service.

[0836] The handler name in peer resolver protocol messages may perform a role similar to that of the handler name in endpoint message addresses: it is a demultiplexing key that specifies how, by which higher-level protocol, or by which module, the message is to be processed. In one embodiment, the users of the peer resolver protocol are typically services. Each instance of a given service (one per peer per group that uses this service) generates a handler name that is unique on its peer, but will be identical for the instances of this service on other peers. In one embodiment, this may be achieved by concatenating the service name (which is unique in the group), the group identifier, which is unique in the peer, and an additional parameter that serves to discriminate between several handlers used by the same service, if needed.

[0837] The handler name may be used both to register the appropriate handler for incoming queries or responses, and as a destination for outgoing queries or responses. In one embodiment, clients of the resolver may define two names: one for propagated messages (e.g. queries), and one for unicast messages (e.g. responses).

[0838] In one embodiment, the peer resolver protocol may not allow the registration of more than one handler with the same name. A service may register for any handler name that it uses as a destination, thereby preventing other services from registering themselves to receive these messages. In one embodiment, a service or application that receives queries or responses from a service instance on another peer is de-facto the local instance of that service and may handle these messages as specified.

[0839] In one embodiment, the peer resolver protocol may not guarantee peers that define a query handler name will receive that query or mandate that all peers that define this handler name will receive it. In this embodiment, the peer resolver protocol may be used to disseminate the query in a way that maximizes the chance of obtaining a response, if one can be obtained. In one embodiment, response to a resolver query request is optional; a peer is not required to respond. In this embodiment, it may not be guaranteed that a response to a resolver query request will be made.

[0840] In one embodiment, a reliable transport may not be required by the peer resolver protocol, and the peer resolver protocol may not assume the presence of reliable message delivery. In one embodiment, multiple resolver query messages may be sent. None, one, multiple or redundant responses may be received.

[0841] In one embodiment, the task of propagating a query to the next set of peers may be handled by the rendezvous protocol. In one embodiment, a rendezvous service may be responsible for determining the set of peers that should receive a message being propagated, but may not automatically re-propagate an incoming propagated message. In this embodiment, the service (query handler) handling the message may determine if further propagation is to be performed. In one embodiment, the peer resolver protocol may use the following policy: if the query handler does not instruct the peer resolver protocol to discard the query, and if the local peer is a rendezvous, then the query is re-propagated (within the limits of loop and TTL rules enforced by the rendezvous service). In addition, if instructed by the query handler, an identical query may be issued with the local peer as the originator.

[0842] Peer Information Protocol

[0843] Once a peer is located, its capabilities and status may be of interest. In one embodiment, the peer-to-peer platform may include a peer information protocol that may allow a peer to learn about other peers' capabilities and status. For example, a peer can send a ping message to see if another peer is alive. A peer may also query another peer's properties where each property has a name and a value string. In one embodiment, a peer may not be required to respond to a peer information protocol request.

[0844]FIG. 17 illustrates one embodiment of using peer information protocol messages between a requesting peer 200A and a responding peer 200B. In one embodiment, to see if peer 200B is alive (i.e. responding to messages), peer 200A may be sent a ping message 240. The ping message 240 may include a destination address that is peer 200B's “main” endpoint returned during discovery, for example. The message may also include a group membership credential of the requesting peer 200A that may identify the probing peer 200A to the message recipient 200B. The message may also contain an identifier unique to the sender. In one embodiment, this identifier may be returned in the response message 242. Response message 242 may include information about peer 200B, including information on the status of the peer 200B. If peer 200B responds with a message 242, this may indicate to peer 200A that peer 200B is “alive” and thus currently responding to messages.

[0845] In one embodiment, messages may be used to get a list of named control “properties” exported by a peer. A property is a “knob” used to get information or configuration parameters from the peer. In one embodiment, all properties may be named (e.g., by a string), and may be “read-only.” In one embodiment, higher-level services may offer “read-write” capability to the same information, given proper security credentials. In one embodiment, each property may have a name and a value string. Read-write widgets may allow the string value to be changed, while read-only widgets do not. In one embodiment, the peer information protocol only gives read access. The destination address is a peer's main endpoint that may have been returned in a discovery response message.

[0846] Once a peer is located, its capabilities and status may be queried. The peer information protocol provides a set of messages to obtain a peer status information. In one embodiment, the peer information protocol is an optional peer-to-peer platform protocol. In one embodiment, peers are not required to respond to peer information protocol requests.

[0847] In one embodiment, the peer information protocol may be layered upon the peer resolver protocol. In one embodiment, a <QueryID> message element may be used to match peer information protocol queries containing <request> elements to the peer information protocol response messages containing the matching responses.

[0848] In one embodiment, the peer information protocol query message may include a request field that may be used to encode a specific request. In one embodiment, the peer information protocol does not dictate the format of the request field and it is left up to the consumer to do so. Higher-level services may utilize the request field to offer expanded capabilities.

[0849] In one embodiment, a reliable transport is not required by the peer information protocol. In one embodiment, multiple peer information messages may be sent. None, one or multiple responses may be received.

[0850] In one embodiment, a peer information protocol query message may be sent to a peer to query the current state of the peer, and to optionally obtain other relevant information about the peer. In one embodiment, a peer information protocol query message without a defined request field may expect in return a default set of information about a peer (i.e. uptime, message count, etc.). In one embodiment, a peer information protocol query message may include a source peer identifier message element that indicates the peer identifier of the requesting peer. In one embodiment, a peer information protocol query message may include a target peer identifier message element that indicates the peer identifier of the peer being queried. In one embodiment, a peer information protocol query message may include a request element. In one embodiment, the request element may be optional.

[0851] In one embodiment, a peer information protocol response message may include specific information about the current state of a peer, such as uptime, inbound and outbound message count, time last message received, and time last message sent. In one embodiment, a peer information protocol response message may include a source peer identifier message element that indicates the peer identifier of the requesting peer. In one embodiment, a peer information protocol response message may include a target peer identifier message element that indicates the peer identifier of the peer being queried. In one embodiment, a peer information protocol response message may include an uptime element that may indicate the relative time (e.g. in milliseconds) since the responding peer information service began execution. In one embodiment, peers may include this element in all peer information protocol responses. In one embodiment, peers may choose to not include this element if the information is unavailable or would represent a security breach. In one embodiment, a peer information protocol response message may include a timestamp element that indicates the absolute time at which this response was generated. In one embodiment, peers may include this element in all peer information protocol responses. In one embodiment, peers may choose to not include this element if the information is unavailable or would represent a security breach. In one embodiment, a peer information protocol response message may include a response element that may include a response to a previous request from a peer information protocol query message. In one embodiment, to match queries to responses, a query identifier element of the peer resolver Protocol must match. This field may include any desired content. In one embodiment, a peer information protocol response message may include a traffic element that may include information about the network traffic performed by the target peer. In one embodiment, this element is optional.

[0852] In one embodiment, a ping message may be sent to a peer to check if the peer is alive and/or to get information about the peer. The ping option may define the response type returned. In one embodiment, a full response (peer advertisement) or a simple acknowledge response (alive and uptime) may be returned. The following is an example of one embodiment of a ping message in XML, and is not intended to be limiting: <Ping> <Credential> Credential </Credential> <SourcePid> Source Peer identifier </SourcePid> <TargetPid> Target Peer identifier </TargetPid> <Option> type of ping requested</Option> </Ping>

[0853] In one embodiment, a peer information response message may be used to send a response message in response to a ping message. The following is an example of one embodiment of a peer information response message in XML, and is not intended to be limiting: <PeerInfo> <Credential> Credential </Credential> <SourcePid> Source Peer identifier </SourcePid> <TargetPid> Target Peer identifier </TargetPid> <Uptime> uptime</Uptime> <TimeStamp> timestamp </TimeStamp> <PeerAdv> Peer Advertisement </PeerAdv> </PeerInfo>

[0854] Peer Membership Protocol

[0855] In one embodiment, the peer-to-peer platform may include a peer membership protocol that may allow a peer to join or leave peer groups, and to manage membership configurations, rights and responsibilities. This protocol may allow a peer to obtain group membership requirements (such as an understanding of the necessary credential for a successful application to join the group), to apply for membership and receive a membership credential along with a fill group advertisement, to update an existing membership or application credential, and to cancel a membership or an application credential. In one embodiment, authenticators and/or security credentials may be used to provide the desired level of protection.

[0856] In one embodiment, the process of joining a peer group may include obtaining a credential that is used to become a group member. In one embodiment, the process of joining a peer group may include obtaining a “form” listing the set of requirements asked of all group members. In one embodiment, this form may be a structured document (e.g. a peer group advertisement) that lists the peer group membership service.

[0857] In one embodiment, the peer membership protocol may define messages including, but not limited to, an apply message, a join message, an acknowledgement (ACK) message, a renew message, and a cancel message. A peer membership protocol apply message may be sent by a potential new group member to the group membership application authenticator. In one embodiment, the authenticator's endpoint may be listed in the peer group advertisement of every member. In one embodiment, a successful response from the group's authenticator may include an application credential and a group advertisement that may list, at a minimum, the group's membership service. In one embodiment, the apply message may include, but is not limited to, the current credential of the candidate group member and the peer endpoint for the peer group membership authenticator to respond to with an acknowledgement (ACK) message.

[0858] The following is an example of one embodiment of a peer membership protocol apply message in XML, and is not intended to be limiting: <MembershipApply> <Credential> Credential of requestor </Credential> <SourcePid> Source pipe identifier </SourcePid> < Authenticator>Authenticator pipe advertisement </Authenticator> </MembershipApply>

[0859] A peer membership protocol join message may be sent by a peer to the peer group membership authenticator to join a group. In one embodiment, the peer may pass an application credential (from an apply response ACK message) for authentication purposes. In one embodiment, a successful response from the group's authenticator may include a full membership credential and a full group advertisement that lists, at a minimum, the group's membership configurations requested of full members in good standing. The message may include a credential (application credential of the applying peer: see ACK message). This credential may be used as the application form when joining. The message may also include the peer endpoint for the authenticator to respond to with an ACK message.

[0860] The following is an example of one embodiment of a peer membership protocol join message in XML, and is not intended to be limiting: <MembershipJoin> <Credential> Credential of requestor </Credential> <SourcePid> Source pipe identifier </SourcePid> <Membersship> membership pipe advertisement </Membership> <Identity> identity</Identity> </MembershipJoin>

[0861] A peer membership protocol ACK message is an acknowledge message that may be used for both join and apply operations. A peer membership protocol ACK message may be sent back by the membership authenticator to indicate whether or nor the peer was granted application rights to the peer group if the peer is applying, or full membership to the peer group if peer is attempting to join. In one embodiment, an ACK message may also be sent in response to peer membership protocol renew messages and cancel messages. The message may include a credential (an application or membership credential allocated to the peer by the peer group authenticator). The message may also include a more complete peer group advertisement that may provide access to further configurations. In one embodiment, not all configuration protocols are visible until the peer has been granted membership or application rights. Some configurations may need to be protected. Also, depending on the peer credential, the peer may not have access to all the configurations.

[0862] The following is an example of one embodiment of a peer membership protocol ack message in XML, and is not intended to be limiting: <MembershipAck> <Credential> Credential </Credential> <SourcePid> Source pipe identifier </SourcePid> <Membersship> membership pipe advertisement </Membership> <Peer groupAdv> peer group advertisement </Peer groupAdv> <Peer groupCredential> credential granted </Peer groupCredential> </MembershipAck>

[0863] A peer membership protocol renew message may be sent by a peer to renew its credential (membership or application) access to the peer group. An ACK (acknowledgement) message may be returned with a new credential and lease if the new is accepted. The renew message may include, but is not limited to, a credential (a membership or application credential of the peer) and the peer endpoint to which an ACK response message may be sent.

[0864] The following is an example of one embodiment of a peer membership protocol renew message in XML, and is not intended to be limiting: <MembershipRenew> <Credential> Credential </Credential> <SourcePid> Source pipe identifier </SourcePid> <Membersship> membership pipe advertisement </Membership> </MembershipRenew>

[0865] A peer membership protocol cancel message may be sent by a peer to cancel the peer's membership or application rights in a peer group. The message may include, but is not limited to, a credential (a membership or application credential of the peer) and the peer endpoint to send an ACK message. In one embodiment, an ACK to a cancel may include a response status indicating the cancel was accepted.

[0866] The following is an example of one embodiment of a peer membership protocol cancel message in XML, and is not intended to be limiting: <MembershipCancel> <Credential> Credential </Credential> <SourcePid> Source pipe identifier </SourcePid> <Membersship> membership pipe advertisement </Membership> </MembershipCancel>

[0867] Pipe Binding Protocol

[0868] In one embodiment, the peer-to-peer platform may include a pipe binding protocol that may allow a peer to find the physical location of a pipe endpoint and to bind a pipe advertisement to the pipe endpoint, thus indicating where messages actually go over the pipe. A pipe is conceptually a virtual channel between two pipe endpoints (input and output pipes) and may serve as a virtual link between two or more peer software components (e.g. services or applications).

[0869] A pipe may be viewed as an abstract, named message queue that supports a number of abstract operations such as create, open, close, delete, send, and receive. The pipe virtual link (pathway) may be layered upon any number of physical network transport links such as TCP/IP, HTTP, and TLS. In one embodiment, the pipe binding protocol is layered upon the endpoint protocol that allows it to use a variety of transport protocols, such as HTTP Transport, TCP/IP Transport, or a secure TLS Transport. Each end of the pipe may work to maintain the virtual link and to reestablish it, if necessary, by binding endpoints or finding the pipe's currently bound endpoints.

[0870] Actual pipe implementations may differ, but in one embodiment, peer-to-peer platform-compliant implementations may use the pipe binding protocol to bind pipes to pipe endpoints. In one embodiment, during the abstract create operation, a local peer binds a pipe endpoint to a pipe transport. In another embodiment, bind may occur during the open operation. Unbind occurs during the close operation. In one embodiment, each peer that “opens” a group pipe may make an endpoint available (binds) to the pipe's transport. In one embodiment, messages may be sent only to the one or more endpoints bound to the pipe. Peers that have not opened the pipe may not receive or send any messages on that pipe. In one embodiment, when some peer software wants to accept incoming pipe messages, the receive operation may remove a single message in the order it was received, not in the order it was sent. In one embodiment, a peek operation may be used as a mechanism to see if any message(s) has arrived in the pipe's queue.

[0871] In one embodiment, the pipe binding protocol may define messages including, but not limited to, a query message and a response message. In one embodiment, a pipe binding protocol query message may be sent by a peer pipe endpoint to find a pipe endpoint bound to the same pipe advertisement. The following is an example of one embodiment of a pipe binding protocol query message in XML, and is not intended to be limiting: <PipeBindingQuery> <Credential> query credential </Credential> <Peer> optional tag. If present, it may include the peer identifier of the only peer that should answer the request. </Peer> <Cached> true if the reply can come from a cache </Cached> <PipeId> pipe identifier to be resolved </PipeId> </PipeBindingQuery>

[0872] In one embodiment, the requestor may ask that the information not be obtained from a cache. This is to obtain the most up-to-date information from a peer to address stale connection. The Peer field specifies a peer identifier. This peer is the one that should respond to the query. In one embodiment, there may be no guarantee that a response to a pipe binding request will be made. In one embodiment, a peer is not required to respond to a binding request. In one embodiment, a reliable transport is not required. In one embodiment, multiple binding query messages may be sent. None, one or multiple responses may be received.

[0873] In one embodiment, a pipe binding protocol response message may be sent to the requesting peer by each peer bound to the pipe in response to a query message. The following is an example of one embodiment of a pipe binding protocol response message in XML, and is not intended to be limiting: <PipeBindingAnswer> <Credential> credential </Credential> <PipeId> pipe identifier resolved </PipeId> <Peer> peer URI where a corresponding InputPipe has been created </Peer> <Found> true: the InputPipe does exist on the specified peer (ACK) false: the InputPipe does not exist on the specified peer (NACK) </Found> </PipeBindingAnswer>

[0874] Endpoint Routing Protocol

[0875] In one embodiment, the peer-to-peer platform may include an endpoint routing protocol. The endpoint routing protocol may be used by peers to send messages to router peers requesting available routes for sending message(s) to destination peers. In one embodiment, this may be accomplished through message exchanges between peer routers. Peer routing may be necessary to enable two peers to communicate depending on their location in the network. For instance, the two peers may be on different transports; the peers may be separated by a firewall; or the peers may be using incompatible private IP address spaces. When necessary, one or more peer routers may be used to deliver a message from the originating peer endpoint to the destination peer endpoint.

[0876] A peer-to-peer platform network is typically an ad hoc, multi-hops, and adaptive network by nature. Connections in the network may be transient, and message routing may be nondeterministic. Routes may be unidirectional and change rapidly. Peers may appear and leave frequently. Two communicating peers may not be directly connected to each other. Two communicating peers may need to use router peers to route messages depending on the network topology. For example, the two peers may be on different network transports, or the peers may be separated by a firewall or a NAT (Network Address Translation) router. A peer behind a firewall may send a message directly to a peer outside a firewall. But a peer outside the firewall cannot establish a connection directly with a peer behind the firewall.

[0877] The endpoint routing protocol may define a set of request/query messages that is processed by a routing service to help a peer route messages to its destination. When a peer is asked to send a message to a given peer endpoint address, it may look in its local cache to determine if it has a cached route to this peer. If the peer does not find a route, it may send a route resolver query message to available peer routers requesting route information. A peer may have access to as many peer routers as it can find, or optionally a peer may be pre-configured to access certain routers.

[0878] Peer routers may provide the low-level infrastructures to route a message between two peers in the network. Any number of peers in a peer group may elect themselves to become peer routers for other peers. Peers routers offer the ability to cache route information, as well as bridging different physical (different transport) or logical (firewall and NAT) networks. A peer may dynamically find a router peer via a qualified discovery search. A peer may find out if a peer it has discovered is a peer router via the peer advertisement, for example by a properties tag and/or by a parameters element.

[0879] When a peer router receives a route query, if it knows the destination (a route to the destination), it may answer the query by returning the route information as an enumeration of hops. The message may be sent to the first router and that router may use the route information to route the message to the destination peer. The route may be ordered from the next hop to the final destination peer. At any point, the routing information may become obsolete, requiring the current router to find a new route in order to complete the message delivery.

[0880] The peer endpoint may add extra routing information to the messages sent by a peer. When a message goes through a peer, the endpoint of that peer may leave its trace on the message. The trace may be used for loop detection and to discard recurrent messages. The trace may also be used to record new route information by peer routers.

[0881] In one embodiment, the endpoint routing protocol may provide last resort routing for a peer. More intelligent routing may be implemented by more sophisticated routing services in place of the core routing service. High-level routing services may manage and optimize routes more efficiently than the core service. In one embodiment, the hooks necessary for user defined routing services to manipulate and update the route table information (route advertisements) used by the peer router may be provided by the endpoint routing protocol. Thus, in one embodiment, the complex route analysis and discovery may be performed above the core by high-level routing services, and those routing services may provide intelligent hints to the peer router to route messages.

[0882] Router peers may cache route information. Router peers may respond to queries with available route information. Route information may include a list of gateways along the route. In one embodiment, any peer may become a router peer by implementing the endpoint routing protocol. The following is an example of one embodiment of route information in XML, and is not intended to be limiting: <endpoint router > <Credential> credential </Credential> <Src> peer identifier of the source </Src> <Dest> peer identifier of the destination </Dest> <TTL> time to live </TTL> <Gateway> ordered sequence of gateway </Gateway> ................... <Gateway> ordered sequence of gateway </Gateway> </endpoint router >

[0883] The time-to-live parameter specifies how long this route is valid. In one embodiment, the time-to-live indicator may be measured in hops. The creator of the route can decide how long this route will be valid. The gateways may be defined as an ordered sequence of peer identifiers that define the route from the source peer to the destination peer. The sequence may not be complete, but in one embodiment, at least the first gateway is present. The first gateway is sufficient to initially route the messages. In one embodiment, the remaining gateway sequence may be optional.

[0884] The endpoint routing protocol may provide messages including, but not limited to, a route request message and a route answer message from the router peer. In one embodiment, a peer may send a route request message to a router peer to request route information. Route information may be cached or not cached. In some cases, the route query request message may indicate to bypass the cache content and thus to search dynamically for a route. In one embodiment, it may not be guaranteed that a route response will be received after a query is sent. The following is an example of one embodiment of a route query request message in XML, and is not intended to be limiting: <endpoint router Query> <Credential> credential </Credential> <Dest> peer identifier of the destination </Dest> <Cached> true: if the reply can be a cached reply false: if the reply must not come from a cache </Cached> </endpoint router Query>

[0885] In one embodiment, a router peer may send a route answer message to a peer in response to a route information request. The following is an example of one embodiment of a route answer message in XML, and is not intended to be limiting: <endpoint router Answer> <Credential> credential </Credential> <Dest> peer identifier of the destination </Dest> <RoutingPeer> Peer identifier of the router that knows a route to DestPeer </RoutingPeer> <RoutingPeerAdv> Advertisement of the routing peer </RoutingPeerAdv> <Gateway> ordered sequence of gateways </Gateway> ................... <Gateway> ordered sequence of gateways </Gateway> </endpoint router Answer>

[0886] In one embodiment, the gateway(s) may be represented by peer-to-peer platform identifiers.

[0887] Endpoint Service

[0888] One embodiment may include an endpoint service that may be responsible for performing end-to-end messaging between two peers, using one of the underlying peer-to-peer platform transport protocols, such as TCP or HTTP bindings. The endpoint service may be used by other services or applications that need to have an understanding of the network topology, such as a resolver service or a propagation service. In one embodiment, the endpoint service is not responsible for routing messages for peers that are not directly connected to each other. This task is performed by the endpoint router transport protocol that may provide the illusion that the source and destination peers are directly connected.

[0889] In one embodiment, when the endpoint service transmits a message it may add the source peer identifier as an element to the message. In one embodiment, the element is a representation of the peer identifier at the point of emission of the message. In one embodiment, this information is optional and may be used by the emitter endpoint service to detect and eliminate propagated messages that loop back to the emitter. If this element is not present, the message may be assumed to not be looping back.

[0890] The endpoint service may expect incoming and outgoing messages to have a source address and a destination address. The encapsulation of that information is specified by the message wire format being used. In one embodiment, the source and destination addresses of a message may be represented as strings in URI format.

[0891] In one embodiment, the endpoint service may delegate the sending of outgoing messages to the endpoint protocol designated by a “protocol” part of the message's destination address. In one embodiment, the endpoint service may deliver incoming messages to the listener registered under the name that matches a concatenation of “unique name of recipient” and “unique name in recipient context” portions of the message's destination address.

[0892] Endpoint Router Transport Protocol

[0893] One embodiment may include an endpoint router transport protocol that is a logical peer-to-peer platform transport protocol at a level “below” the endpoint service and with one or more other transport protocols such as TCP and HTTP Transport Protocols. The endpoint router may be responsible for exchanging messages between peers that do not have a direct connection between each other. The endpoint router may provide a virtual direct connection to the peer's endpoint service.

[0894] In one embodiment, the endpoint router transport protocol defines a set of query and response messages that may be used to communicate with instances of the endpoint router on other peers. In one embodiment, the messages may be sent and received by the endpoint router using a resolver service. These messages may include one or more of, but are not limited to:

[0895] Route query: when the endpoint router is requested to send a message to a peer for which it does not have yet a route for, the endpoint router may send a route query request to other peers. One or more peers that have a route for the given peer may answer with route responses.

[0896] Route response: a peer that desires to inform another peer about a give route may send a route response to the other peer. A route response may be a reply to a route query.

[0897] Ping query: a ping query may be sent to a peer in order to validate a route. A peer receiving a ping query is requested to answer with a ping response.

[0898] Ping response: a ping response may be sent to an originator of a ping query.

[0899] In one embodiment, the endpoint router may define an informational message that requires no reply. This message may be sent by any peer that detects that a route used by another peer is not valid. For example, a router peer that is requested to route a message to a peer for which it does not have a route may send an informational message. In one embodiment, the informational message is optional: routers are not required to send them. While an informational message is typically sent to the source peer of a message, peers may send informational messages to other peers of their choice.

[0900] In one embodiment, the endpoint router transport protocol may append a message element to each message it transports. In one embodiment, the element may be a markup language (e.g. XML) document. In one embodiment, the element may include one or more of, but is not limited to, the following:

[0901] Source: the original endpoint address of the source of the message. In one embodiment, this may be required.

[0902] Destination: the original endpoint address of the destination of the message. In one embodiment, this may be required.

[0903] Last Hop: The endpoint router endpoint address of the last router that processed the incoming message to route. In one embodiment, this may be required.

[0904] Number of hops: the number of the peers the incoming message to route has already been through. In one embodiment, this may be required.

[0905] Forward Route: a list of one or more endpoint router endpoint addresses of the peers the message is supposed to go through in order to reach its destination. In one embodiment, this list is optional since each router may use a query route request in order to find a route. This list may be used to preferably decrease the network traffic by limiting the use of queries, which may be expensive.

[0906] Reverse Route: a list of one or more endpoint router endpoint addresses of the peers the message is supposed to go through in order to reach its source. In one embodiment, this list is optional since each router may use the query route request in order to find a route. This list may be used to preferably decrease the network traffic by limiting the use of queries, which may be expensive.

[0907] In one embodiment, queries and responses defined by the endpoint router transport protocol may be sent using a resolver service. In one embodiment, the messages may be represented by a markup language (e.g. XML) document (passed to and by the resolver service). In one embodiment, endpoint router transport protocol messages may include one or more of, but is not limited to, version information, type information (e.g. route query, route response, ping query, ping response, or informational message), destination peer (e.g. endpoint router endpoint address), routing peer (e.g. endpoint router endpoint address), routing peer advertisement, number of hops, and gateway forward (e.g. endpoint router endpoint address).

[0908] In one embodiment, depending on the type of the message, only a subset of the above may be used. For a route query, destination peer may include the peer identifier (in its endpoint router definition) of the peer for which a route is requested. For a route response, destination peer may include the peer identifier (in its endpoint router definition) of the peer for which a route was requested. Routing peer may include the endpoint address of the peer that knows how to route message to the destination peer. Routing peer advertisement may optionally include the peer advertisement of the routing peer, which if included may allow the requesting peer to not have to search for the advertisement later on. Number of hops may indicate the number of hops of the route starting at the routing peer. Gateway forward may include the endpoint address(es) of routing peer(s) within the route. In one embodiment, gateway forward is a list of that may define the entire route to be used starting at the routing peer in order to reach the destination. In one embodiment, endpoint routers are not required to fill up this list; however, filling the list may be desired if the endpoint router desires to use the optimization of embedding the forward route within the message.

[0909] For a ping query, destination peer may include the peer identifier (in its endpoint router definition) of the peer for which a ping is requested. For a ping response, destination peer may include the peer identifier (in its endpoint router definition) of the peer for which a ping was requested. For an informational message, destination peer may include the peer identifier (in its endpoint router definition) of the peer for which the route has failed. If a message for which a route has failed includes a list in gateway forward, this list may be included in the informational message.

[0910] In one embodiment, the endpoint router transport protocol may append an endpoint router message element to messages it transports. In one embodiment, the element may be a markup language (e.g. XML) document. In one embodiment, the element may include one or more of, but is not limited to, a source, a destination, a last peer, a number of hops, a gateway forward, and a gateway reverse. The source may include the endpoint address of the original source of the message. The destination may include the address of the original destination of the message. The last peer may indicate the address of an immediately previous peer that has received the message. The number of hops may indicate the number of hops of the reverse route (0 if there is no reverse route.) The gateway forward may include the endpoint address(es) of one or more routing peers within the forward route. In one embodiment, gateway forward may be a list that defines the route to be used in order to reach the destination peer of the message. In one embodiment, endpoint routers may not be required to fill up this list; however, doing so may decrease latency of communication between peers. Gateway reverse may include the endpoint address(es) of one or more routing peers within the reverse route. In one embodiment, gateway forward may be a list that defines the route to be used in order to reach the source peer of the message. In one embodiment, endpoint routers may not be required to fill up this list; however, doing so may decrease latency of communication between peers.

[0911] In one embodiment, the endpoint router transport protocol may have its own endpoint address format. The following is an exemplary endpoint address format for the endpoint router transport protocol and is not intended to be limiting:

[0912] xxxx://uuid—<PeerID unique value>

[0913] Routing

[0914] In one embodiment, the peer-to-peer platform may provide a mechanism or mechanisms for searching and accessing peers, peer groups, content, services and other information in a dynamic topology of peers and peer groups, where peers and peer groups can come and go. In one embodiment, peers and peer groups may come and go potentially with limited or no control and notification. Peers may connect to a peer-to-peer network through various wired and wireless protocols, including “not connected” protocols such as may be used by mobile consumer devices such as pagers and PDAs. Peers may also have to cross boundaries, for example boundaries created by firewalls and NAT (Network Address Translation) routers, to connect to other peers.

[0915] In one embodiment, an application that supports the peer-to-peer platform may help in routing and discovering. Some of the information needed to accomplish routing and discovering may be only known by the application. For example, the application may support a special type of data as content, and so the application may best “know” how to discover items of this special content. Also, the application may have a better knowledge of the topology (related to the nature of the application and/or peer group) than the core peer-to-peer platform.

[0916] In one embodiment, in order to bootstrap the system, and also in order to have a fallback mechanism if an application cannot or does not support one or more of the tasks, the core peer-to-peer protocols may provide a discovery and router mechanism for discovering peers and other core abstractions such as advertisements, pipes, and peer groups. In one embodiment, the discovery and routing mechanism of the peer-to-peer platform may use as few protocols as possible, is simple, and makes use of underlying optimizations when available. Hooks into the core discovery and router mechanism may be provided so that applications and services may participate in the discovery and router mechanisms, for example, by passing information to the core discovery and router mechanism. In one embodiment, an application or service may be allowed to override the core discovery and router mechanism with its own custom mechanism.

[0917] In one embodiment, the core discovery and router mechanism may be based on web crawling. Web crawling may be well suited for use in self-organizing networks such as peer-to-peer networks. In one embodiment, peers may be configured to participate or not to participate in the discovery and router mechanism, and may be configured as to the level of involvement in the process In one embodiment, a peer may decide whether to participate in a discovery or routing task depending on the peer's configuration in the peer-to-peer network. In one embodiment, the configuration may be determined using an automated detection of the position of the peer on the network and a network configuration wizard tool.

[0918] Web crawling may not create bottlenecks such as may be created by the mechanism of a client knowing a server and always going to the same server to find and retrieve information (e.g. DNS, NFS etc.). Even if a server is replicated, like DNS, it is still a centralized server. If all the known instances of the server are not reachable, a client may lose access to the server, even if another (but unknown) server is, indeed, available. In a point-to-point network, the information a peer is looking for is generally “close by” or may eventually be “close by”, so web crawling may not go too far.

[0919]FIG. 18 illustrates several core components and how they interact for discovery and routing according to one embodiment. Application 300 may use discovery 308 to find peers, peer groups, advertisements, and other entities on the peer-to-peer network, and may also publish pipe, peer, peer group, service, and other advertisements for access by other peers, applications and services on the peer-to-peer network. In one embodiment, the endpoint 310 may be responsible for exchanging messages between peers that are directly “connected” to each other (i.e. the peers can reach each other without any routing and/or discovering). When available, multicast may be used to discover peers that the endpoint can reach (multicast is a mechanism which has been introduced in IP in order to optimize this kind of process). In addition to that, or when multicast is not available, A rendezvous and invitation mechanism may also be provided. The rendezvous and invitation method may be used, for example, if multicast is not available. For example, HTTP does not provide multicast capabilities.

[0920] The endpoint router 312 may manage a cache of routes, for example routes to remote peers. In one embodiment, the endpoint router 312 may be configured from caching no routes to caching all routes it is aware of, depending on what the configuration wizard has decided with user control. The endpoint router 312 may also forward (route) messages depending on what is found in the cache, and what has been configured. For instance, the endpoint router 312 may be configured to route search (propagate) requests or to not route the requests.

[0921] In one embodiment, the generic resolver 308 is a protocol that implements a sort of RPC (query/response) protocol on top of the endpoint 310. Discovery 306 and pipe resolver 304 may use the generic resolver. In one embodiment, discovery 306 may be responsible for searching, caching and generating core advertisements (e.g. peer, peer group, and pipe advertisements). Discovery 306 may use the generic resolver 308 to send query messages and to receive answers. In one embodiment, discovery 306 may be aware of rendezvous peers and may have an invitation mechanism that may be used to assist the generic resolver 308. In one embodiment, the pipe resolver 304 may be responsible for localizing the receiving end of a pipe 302 given a pipe advertisement. In one embodiment, the pipe resolver 304 does not search for a pipe advertisement. In one embodiment, the pipe resolver 304 may be configured to manage a cache of the locations of the receiving ends (i.e. receiving peers) of the pipe 302.

[0922] The pipe protocol may use the endpoint 310 for transferring messages (with the potential help of the endpoint router 312) between the sending end of the pipe 302, and the receiving end of the pipe 302. In one embodiment, a pipe 302 may be viewed as an endpoint 310 that has not been bound to a particular peer. In one embodiment, a pipe 302 may be moved seamlessly from one peer to another. In one embodiment, a pipe 302 may also provides uniqueness that may not be provided by an endpoint 310 since a pipe identifier is unique in time and space, and an endpoint 310, being a network address, may not be.

[0923] A discovery and router mechanism based on web crawling may be time-expensive, and higher level protocols (such as applications) may have information that the core is not aware of that may help in the web crawling process. In one embodiment, to enable applications to participate in the process, components of the core mechanism may provide hooks that enable the applications to assist in the process (e.g. by providing information). Some transport protocols such as HTTP may be configured for and/or dynamically learn about web rendezvous peers it can use. An application may be provided access to the list of rendezvous peers. In one embodiment, an application may be allowed to set/unset routes in an endpoint router 312. Each route may be qualified to route or not route propagate messages such as web crawling messages and/or unicast messages. The endpoint router 312 may be viewed as a route cache manager, which is may be controlled by an endpoint 310 and/or other entities that may need to control it. In one embodiment, an endpoint router 312 may be able to discover unknown routes from applications. In one embodiment, discovery 308 may be configured (statically and/or dynamically) to control the nature and the amount of data that it manages. In one embodiment, discovery 308 may be taught where to go search, or where not to go search. In one embodiment, discovery 308 may make an “upcall” to a search/retrieve mechanism. In one embodiment, a pipe resolver 304 may manage a cache of input pipes (receiving ends). In one embodiment, pipe resolver 304 may be accessed by applications to set/unset entries in the cache.

[0924] Router Peers

[0925]FIG. 19 illustrates one embodiment of message routing in a peer-to-peer network that uses the peer-to-peer platform. Peers 200 in peer groups 210A and 210B may communicate with each other through one or more router peers 244. In one embodiment, message routing may route messages to “unreachable” peers, i.e. may allow messages sent from a peer 200 to reach peers 200 that are otherwise unreachable. Networks may be partitioned by firewalls, NAT (Network Address Translation) routers, etc. Message routing may allow messages to be delivered in partitioned networks. Message routing may also allow peers 200 separated by one or more partitions to participate in the same peer group(s) 210. Message routing may provide optimized message delivery, for example by optimizing routes between peers 200. Message routing may allow for an adaptive peer-to-peer network (e.g. peers may move to remote locations and still receive messages). Message routing may provide load balancing. In one embodiment, any peer may be a router peer 244.

[0926] One embodiment may provide for HTTP routing servers. In one embodiment, HTTP routers may provide for message routes that traverse firewalls. In one embodiment, HTTP routers may provide NAT support. In one embodiment, HTTP routers may act as message gateways (TTL). TTL stands for Time To Live (how long the request lives in the system).

[0927] The widespread use of NAT (Network Address Translation) and firewalls may affect the operation of many peer-to-peer systems. It also may affect the peer-to-peer platform. In particular, a peer outside a firewall or a NAT gateway cannot discover peers inside the firewall or the NAT gateway. In the absence of getting system administrators to let the peer-to-peer platform traffic through (say by opening a special incoming port at the firewall or gateway), possible methods to deal with this problem include, but are not limited to:

[0928] In one embodiment, peers inside firewalls may be asked to initiate connections to peers outside the firewall.

[0929] In one embodiment, peer nodes may be set up that operate like mailbox offices where traffic to a peer inside the firewall is queued up to be picked up at a designated relay peer outside the firewall. The peer inside the firewall can initially reach outside the firewall, select a relay peer, and widely advertise this fact. Later, it can periodically contact the relay peer to retrieve messages.

[0930] One embodiment of the peer-to-peer platform may provide router peers. The router peers may be at a lower level than rendezvous peers. The router peers may provide “pure” message routing. By looking at the destination and source addresses, the router peer may determine where a message needs to be sent. In one embodiment, a router peer may call or access a rendezvous peer to “discover” information about peers, etc. In other words, the router peer may access information from a rendezvous peer to use the information in routing messages.

[0931] In one embodiment, router peers may provide the lowest message routing layer in the peer-to-peer platform. Routing may involve complex topologies. For example, the routing peers may provide a method to route across a firewall, particularly from peers outside the firewall to peers inside the firewall. A peer cannot send a message directly to another peer behind a firewall, since by definition there may be no direct route from a peer outside the firewall to a peer inside the firewall. A router peer may route messages to a gateway peer (a mailbox server where messages for peers behind the firewall may be temporarily stored). In one embodiment, the gateway peer may be a router peer acting as a gateway. The peers behind the firewall may periodically poll the mailboxes provided by the gateway peer to determine if someone has tried to contact them (i.e. are there any messages in my mailbox?). Note that a “pipe” provides an abstraction at a higher level than the message routing provided by router peers, and thus, a pipe may be an abstraction across the network topology between peers, for example peers on opposite sides of a firewall, through which the peers may communicate. At the lowest level, one or more router peers may discover and establish the actual communications route between the peers. This level, however, may be transparent to the peers, who only “see” the pipes.

[0932] In one embodiment, a router peer may build a route table. The router peer may keep information about routes that it discovers and store them in the route table. This allows the router peer to build a knowledge base (the route table) about the network topology as more messages flow on the system. This information may be used by the router peer to discover and establish optimal routes between entities in the network, and may increase its ability to reach other peers.

[0933] A router peer may access another router peer it is aware of to get route information. The route information may be described as a stacked set of destinations (and the routes to the destinations). In one embodiment, the information the router peer stores on a particular route may be incomplete, because the router peer may only know about the route up to a certain point. For example, the router peer may know about a first portion of a route up to another router peer, which knows about the next portion of the route, and so on.

[0934] In one embodiment, each peer has a unique peer identifier that is independent of, and is not assigned to, fixed addresses. Peers may move around. Therefore, the peer-to-peer network topology may be dynamic, and may change every time a peer goes away or moves. Thus, in one embodiment, the routing method provided by the router peers may be dynamic to support the dynamic topology. When a peer moves and reconnects, the peer is recognized as the same peer that was previously connected elsewhere in the network. This process may use the unique identifier of the peer to indicate that the peer is the same one that was previously connected elsewhere. In one example, when a peer moves, it may go through a discovery process to discover peers and rendezvous peers in its new local subnet or region. If the peer wishes to join a peer group that it used at its previous location, it may then attempt to discover other peers that have knowledge of the peer group or other peers in the peer group. The message may be passed through several router peers until it may reach a router peer that has knowledge about the peer group (e.g. a route to the peer group) to return to the requesting peer. For example, a user with a laptop may fly from a home office to another city. When the user connects to the network in the other city, a route may be established, through the services provided by router peers, to the home office network peer group. The user may then access email and other services provided by the peer group. From the user's standpoint, this process may seem automatic. For example, the user may not be required to “dial in” or connect remotely to an ISP to access the office as is required in typical networks using static addressing.

[0935] In one embodiment, when a peer becomes a router peer, it may access a stored route table as a starting point. In one embodiment, the peer may start from scratch with an empty route table. In one embodiment, the peer, when it becomes a router peer, may initiate a discovery of other router peers and/or rendezvous peers to get as much connectivity information to key peers in the network as possible.

[0936] In one embodiment, every peer may have knowledge of at least one router peer. In one embodiment, there may be a “universal router” that many or all peers may be aware of that may be accessed when a peer cannot find anyone. The universal router may be able to put the peer into contact with somebody (e.g. another peer) to help in the bootstrapping process.

[0937] Security

[0938] The security requirements of a peer-to-peer system may be similar to any other computer system. The three dominant requirements are confidentiality, integrity, and availability. These translate into specific functionality requirements that include authentication, access control, audit, encryption, secure communication, and non-repudiation. Such requirements are usually satisfied with a suitable security model or architecture, which is commonly expressed in terms of subjects, objects, and actions that subjects can perform on objects. For example, UNIX has a simple security model. Users are subjects. Files are objects. Whether a subject can read, write, or execute an object depends on whether the subject has permission as expressed by the permissions mode specified for the object. However, at lower levels within the system, the security model is expressed with integers, in terms of UID, GID, and the permission mode. Here, the low-level system mechanisms do not (need to) understand the concept of a user and do not (need to) be involved in how a user is authenticated and what UID and GID they are assigned.

[0939] In one embodiment, to support different levels of resource access in a dynamic and ad hoc peer-to-peer network, the peer-to-peer platform may provide a role-based trust model in which an individual peer may act under the authority granted to it by another trusted peer to perform a particular task. Peer relationships may change quickly and the policies governing access control need to be flexible in allowing or denying access. In one embodiment, the trust model may provide security including, but not limited to, confidentiality, authorization, data integrity and refutability. Confidentiality guarantees that the contents of the message are not disclosed to unauthorized individuals. Authorization guarantees that the sender is authorized to send a message. Data integrity guarantees that a message was not modified accidentally or deliberately in transit. Refutability guarantees a message was transmitted by a properly identified sender and is not a replay of a previously transmitted message.

[0940] In one embodiment, peer-to-peer platform messages are structured to allow peer-to-peer platform services and applications to add arbitrary metadata information to the messages such as credentials, digests, certificates, public keys, etc. A credential is a token that when presented in a message body is used to identify a sender and can be used to verify that sender's right to send the message to the specified endpoint. The credential is an opaque token that must be presented each time a message is sent. The sending address placed in the message envelope may be cross-checked with the sender's identity in the credential. Each credential's implementation is specified as a plug-in configuration, which allows multiple authentication configurations to co-exist on the same network. Message digests guarantee the data integrity of messages. Messages may also be encrypted and signed for confidentiality and refutability.

[0941] In one embodiment, the peer-to-peer platform protocols may be compatible with widely accepted transport layer security mechanisms for message-based architectures such as Transport Layer Security (TLS), Secure Sockets Layer (SSL), and Internet Protocol Security (IPSec). However, secure transport protocols such as TLS, SSL and IPSec may only provide the integrity and confidentiality of message transfer between two communicating peers. In order to provide secure transfer in multi-hops network, a trust association may be established among all the intermediary peers. Security is compromised if anyone of the communication links is not secured. One embodiment of the peer-to-peer platform may provide a virtualized Transport Layer Security (TLS) implementation that allows secure endpoint-to-endpoint communications regardless of the number of hops required to deliver each message.

[0942] The peer-to-peer platform security model may be implemented to provide a peer-to-peer web of trust. The web of trust may be used to exchange public keys among its members. Each peer group policy may permit some members to be trusted to the extent that they have the authority to sign public keys for other members as well as to do things like authenticate, add new members, and remove or revoke membership.

[0943] Embodiments may implement security classes for the RSA public key exchange, the RC4 byte stream cipher, and the SHA-1 hash algorithm, among others. These classes may enable privacy by the means of a peer-to-peer TLS implementation; integrity with signed hashes; non-repudiation using the web of trust; and MACs for data authenticity. Combinations of these classes may form security suites, and the peer-to-peer platform provides the mechanism to add new customized suites as required.

[0944] In some embodiments, for peer group authentication a separate Pluggable Authentication Module (PAM) may be provided. Embodiments may provide anonymous or guest login, and login with user name and password. A login session may be in clear or cipher-text as per the peer group security policy.

[0945] The security module may be available to the core level, and thus services, applications and advanced services and applications may plug in their own security components and protocols. For example, the web of trust may be defined by a policy that requires authorized peer group members to be well-known certificate authorities, and that peers exchange X509v3 CA signed certificates.

[0946] Given that the peer-to-peer platform is defined around the concepts of peers and peer groups, one embodiment may include a security architecture in which peer identifiers and group identifiers are treated as low-level subjects (just like UID and GID), codats are treated as objects (just like files), and actions are those operations on peers, peer groups, and codats.

[0947] One or more of several other characteristics of the peer-to-peer platform may further affect the security requirements of the peer-to-peer platform. In one embodiment, the peer-to-peer platform may be focused on mechanisms and not policy. For example, UUIDs are used throughout, but they by themselves have no external meaning. Without additional naming and binding services, UUIDs are just numbers that do not correspond to anything like a user or a principal. Therefore, in one embodiment, the peer-to-peer platform may not define a high-level security model such as information flow, Bell-LaPadula, or Chinese Wall. In one embodiment, when UUIDs are bound to external names or entities to form security principals, authenticity of the binding may be ensured by placing in the data field security attributes, for example, digital signatures that testify to the trustworthiness of the binding. Once this binding is established, authentication of the principal, access control based on the principal as well as the prevailing security policy, and other functions such as resource usage accounting may be performed.

[0948] In one embodiment, the peer-to-peer platform may be neutral to cryptographic schemes and security algorithms. As such, the peer-to-peer platform may not mandate any specific security solution. In such cases, a framework may be provided where different security solutions can be plugged in. In one embodiment, hooks and placeholders may be provided so that different security solutions may be implemented. For example, every message may have a designated credential field that may be used to place security-related information. In one embodiment, exactly how to interpret such information is not defined in the peer-to-peer platform, and may be left to services and applications.

[0949] In one embodiment, the peer-to-peer platform may sometimes satisfy security requirements at different levels of the system. In one embodiment, to provide flexibility and avoid redundancy, the peer-to-peer platform may not force a particular implementation on developers. Instead, enhanced platforms based on the peer-to-peer platform may provide the appropriate security solutions to their targeted deployment environment. To illustrate the last point, two security concerns (communications security and anonymity) are examined.

[0950] Peers communicate through pipes. As an example, suppose both confidentiality and integrity in the communications channel are desired. In one embodiment, Virtual Private Networks (VPNs) may be used to move all network traffic. In one embodiment, a secure version of the pipe may be created, similar to a protected tunnel, such that any message transmitted over this pipe is automatically secured. In one embodiment, regular communications mechanisms may be used, and specific data payloads may be protected with encryption techniques and digital signatures. Embodiments of the peer-to-peer platform may accommodate one or more of these and other possible solutions.

[0951] Anonymity does not mean the absence of identity. Indeed, sometimes a certain degree of identification is unavoidable. For example, a cell phone number or a SIM card identification number cannot be kept anonymous, because it is needed by the phone company to authorize and set up calls. As another example, the IP number of a computer cannot be hidden from its nearest gateway or router if the computer wants to send and receive network traffic. In general, anonymity can be built on top of identity, but not vice versa. There may be multiple ways to ensure anonymity. In the examples above, it is difficult to link a prepaid SIM card sold over the retail counter for cash to the actual cell phone user. Likewise, a cooperative gateway or router may help hide the computer's true IP address from the outside world by using message relays or NAT (Network Address Translation).

[0952] In one embodiment, a peer-to-peer platform-based naming service may bind a peer to a human user. The user's anonymity may be ensured through the naming service, or the authentication service, or a proxy service, or any combination of these. In one embodiment, the peer-to-peer platform may be independent of the solution chosen by a particular application.

[0953] At many places, the peer-to-peer platform may be independent of specific security approaches. In one embodiment, the peer-to-peer platform may provide a comprehensive set of security primitives to support the security solutions used by various peer-to-peer platform services and applications. Embodiments of the peer-to-peer platform may provide one or more security primitives including, but not limited to:

[0954] A simple crypto library supporting hash functions (e.g., MD5), symmetric encryption algorithms (e.g., RC4), and asymmetric crypto algorithms (e.g., Diffie-Hellman and RSA).

[0955] An authentication framework that is modeled after PAM (Pluggable Authentication Module, first defined for the UNIX platform and later adopted by the Java security architecture).

[0956] A simple password-based login scheme that, like other authentication modules, can be plugged into the PAM framework.

[0957] A simple access control mechanism based on peer groups, where a member of a group is automatically granted access to all data offered by another member for sharing, whereas non-members cannot access such data.

[0958] A transport security mechanism that is modeled after SSL/TLS, with the exception that it is impossible to perform a handshake, a crypto strength negotiation, or a two-way authentication on a single pipe, as a pipe is unidirectional.

[0959] The demonstration services called InstantP2P and CMS (content management service) also make use of additional security features provided by the underlying Java platform.

[0960] In one embodiment, peers, configurations, peer groups, and pipes form the backbone of the peer-to-peer platform. Security in some embodiments of the peer-to-peer platform may use credentials and authenticators (code (e.g. computer-executable instructions) that may be used to receive messages that either request a new credential or request that an existing credential be validated). A credential is a token that when presented in a message body is used to identify a sender and can be used to verify that sender's right to send the message to the specified endpoint and other associated capabilities of the sender. The credential is an opaque token that must be presented each time a message is sent. The sending address placed in the message envelope may be crosschecked with the sender's identity in the credential. In one embodiment, each credential's implementation may be specified as a plug-in configuration, which allows multiple authentication configurations to co-exist on the same network.

[0961] In one embodiment, messages may include, at a minimum, a peer group credential that identifies the sender of the message as a full member peer in the peer group in good standing. Membership credentials may be used that define a member's rights, privileges and role within the peer group. Content access and sharing credentials may also be used that define a member's rights to the content stored within the group.

[0962] In one embodiment, the peer-to-peer platform may provide different levels of security. In one embodiment, APIs may be provided to access well known security mechanisms such as RCA. In one embodiment, the peer-to-peer platform may provide a distributed security mechanism in a peer-to-peer environment. In one embodiment, this distributed security may not depend on certificates administered by a central authority. The distributed security mechanism may allow a peer group “web of trust” to be generated. In the distributed security mechanism, peers may serve as certificate authorities (security peers). Each peer group may include one or more peers that may serve as a certificate authority in the group. In one embodiment, the creator of a peer group may become the default security authority in the group. In one embodiment, if there is more than one creator, the creator peers may choose one of the peers to be the security authority in the group. In one embodiment, the peer or peers that create a peer group may define the security methods that are to be used within the group (anywhere from no security to high levels of security). In one embodiment, more than one peer in a peer group may serve as a security peer. Since peers are not guaranteed to be up at all times, having multiple security peers in a peer group may help insure that at least one security peer is available at all times. In one embodiment, the peer group's certificate peer may verify keys to provide a weak level of trust. In one embodiment, peer-to-peer platform advertisements may include information to describe the security mechanism(s) to be used in a peer group. For example, the advertisement may include information to do public key exchange, information to indicate what algorithms are to be used, etc. The advertisement may also include information that may be used to enforce secure information exchange on pipes (e.g. encryption information).

[0963] In one embodiment, peer group security may establish a “social contract”. The role of security is distributed across peer groups, and across members of peer groups, that all agree to participate by the rules. A peer group may establish the set of rules by which security in the group is enforced. A peer may join the peer group with a low level of security clearance (low trust). If the peer stays in the group and behaves (follows the rules), the peer may build up its level of trust within the group, and may eventually be moved up in its security level. Within peer groups operating under a social contract, certificates and/or public keys may be exchanged without the participation of a strict certificate authority; i.e. the members may exchange certificates based upon their trust in each other. In one embodiment, a peer group may use an outside challenge (e.g. a secret group password) that may be encrypted/decrypted with public/private keys, as a method to protect and verify messages within the group. In one embodiment, peer groups may be configured to use other types of security, including a high level of security, for example using a strict certificate authority, and even no security. In one embodiment, peer-to-peer platform messages exchanged within a group may have a “placeholder” for security credentials. This placeholder may be used for different types of credentials, depending upon the security implementation of the particular group. In one embodiment, all peer-to-peer messages within the group may be required to have the embedded credential. One embodiment may support private secure pipes.

[0964] Peer-to-peer platform Firewalls and Security

[0965] The peer-to-peer platform may provide one or more methods for traversing firewalls. FIG. 20 illustrates traversing a firewall 248 in a virtual private network when access is initiated from outside only according to one embodiment. Peers 200 on either side of the firewall 248 may each belong to one or more peer groups. In one embodiment, entry may be restricted to peers 200 with access privileges. In this example, peers 200A and 200B have access privileges, but peer 200C does not. Thus, peers 200A and 200B may access peers 200D and 200E through firewall 248. In one embodiment, HTTP “tunnels” may be used, with proxies 246 in the “DMZ” of the firewall 248.

[0966]FIG. 21 illustrates email exchange through a firewall 248 via an email gateway 260 according to one embodiment. In this example, peers 200A and 200B outside the firewall 248 may exchange messages to peers 200C and 200D via the email gateway 260. In one embodiment, there may be an SMTP (Simple Mail Transfer Protocol) service 262 on each peer 200. In one embodiment, 100% peer-to-peer access may not be guaranteed. In one embodiment, inside the firewall 248, mail account administration may impose restrictions. In one embodiment, email addresses may not be required for all peers 200 outside of the firewall 248.

[0967]FIG. 22 illustrates several methods of traversing a firewall 248 when access is initiated from the inside according to one embodiment. One or more peers 200 may be inside the firewall 248, and one or more peers 200 may be outside the firewall 248. In one embodiment, each peer 200 that needs to traverse firewall 248 may include a mini-HTTP server. In this embodiment, an HTTP proxy may be used to provide peer-to-peer HTTP tunnels 264 through firewall 248. In one embodiment, Secure Shell (SSH) tunnels 266 may be used to traverse firewall 248. One embodiment may support SOCKS connections 268 if SOCKS is supported in the firewall 248. SOCKS is typically used to telnet/ftp to the “outside.” Other embodiments may include other methods of traversing firewalls.

[0968] In one embodiment, peer-to-peer platform core protocols may be used for firewall traversal. In one embodiment, the impact on the peer-to-peer protocol core may be minimized in the traversal method. In one embodiment, peers may use the “pure” core protocols for traversal whenever possible. In embodiments where the core protocols need to be extended for traversal, a “divide and conquer” technique may be used. In a divide and conquer technique, any new configurations (policies) may be isolated behind the firewall. A proxy or proxies may then be used to mediate with and bridge to the core protocols. In one embodiment, peers on either side of the firewall may initiate peer group contact with full peer-to-peer protocol implementation including, but not limited to, the ability to initiate peer group discovery, the ability to join/leave peer groups, and the ability to create end-to-end pipes (cipher text data exchange when required).

[0969]FIG. 23 illustrates one embodiment of a peer-to-peer platform proxy service 270, and shows various aspects of the operation of the proxy service. One or more peers 200 may be inside a firewall 248, and one or more peers 200 may be outside the firewall 248. Peer-to-peer platform proxy service 270 is also shown outside the firewall 248. Proxy service 270 may be used to enable peer 200 and peer group contact across firewall 248. Firewall 248 may include an email gateway 260. In one embodiment, the proxy service 270 may be used to bridge peer-to-peer platform protocols 272 with HTTP 274, email 276 and/or SOCKS 278. The proxy service 270 may allow peers 200 to send requests to communicate across firewall 248. Through the proxy service 270, peer-to-peer platform messages may be posted for delivery across the firewall 248. In one embodiment, the proxy service 270 may allow secure pipes to be established across the firewall 248 as necessary.

[0970]FIG. 24 illustrates a method of using a proxy service for peer group registration according to one embodiment. The proxy service may permit firewall-independent peer group membership. Three peer regions 212 are shown, with two (region 212A and 212B) on one side of firewall 248 and one (region 212C) on the other side of firewall 248. A peer group 210 may be established that extends across the firewall 248 into regions 212A, 212B and 212C. One or more peers 200 in each region 212 may be members of the peer group 210.

[0971]FIG. 25 illustrates peer group registration across a firewall according to one embodiment. Peer region 212A is shown outside of a firewall 248 and peer region 212B is behind the firewall 248. Peer region 212A includes a peer-to-peer platform proxy service 270 and several peers 200. In one embodiment, a peer 200 may be serving as a proxy peer that provides the proxy service 270. Peer region 212B includes several peers 200 behind the firewall 248. At some point, peer 200D in peer region 212B may form a peer group 210. An advertisement for the peer group 210 may be registered on the proxy service 270 in the region 212A. One or more peers 200 in region 212A may be notified of the newly registered peer group 200 by the proxy service 270. In one embodiment, the proxy service may also notify other known peer-to-peer platform proxy services in this or other regions 212, who in turn may notify other proxy services, and so on. Peers 200 in region 212A may then apply for membership in peer group 200.

[0972]FIG. 26 illustrates a method of providing peer group membership through a peer-to-peer platform proxy service according to one embodiment. Peer regions 212A and 212B are shown outside of a firewall 248, and peer region 212C is behind the firewall 248. The two peer group regions 212 outside the firewall 248 each include a proxy service 270. At least one of the peers (peer 200F, in this example) in region 212C behind the firewall belongs to a peer group 210. The peer group 210 may be registered with the proxy services 270 in the regions 212A and 212B outside the firewall 248. A peer 200 in either of the regions outside the firewall may join the peer group 200 by proxy through the proxy service 270 in its region 212. Peers 200 in the regions 212 outside the firewall 248 that are members of the peer group 210 may also leave the peer group 210 through the proxy service 270. Membership information (e.g. included in peer group advertisements) for the peer group 200 may be synchronized on all known proxy services 270 outside the firewall 248. In one embodiment, a proxy service 270 may be a member peer of all locally registered peer groups 200.

[0973] Several levels of authentication may be provided in one or more embodiments of the peer-to-peer platform. Anonymous login may be provided in one embodiment. In one embodiment, a plain text login (user or user and password) may be provided. In one embodiment, login with privacy may be provided. In this embodiment, public key exchange may be used and/or a symmetric master key. In one embodiment, the login process may return a credential to the joining peer so that the peer may bypass the login process until the credential expires. One embodiment may provide a public key chain that may be used by registered users to eliminate public key exchanges and thus provides unauthenticated access. On embodiment may provide secure public key exchange with signed certificates.

[0974]FIGS. 27A and 27B illustrate a method of providing privacy in the peer-to-peer platform according to one embodiment. FIG. 27A shows a peer region 212 with peers 200A and 200B and a peer-to-peer platform proxy service 270. Peers 200A and 200B may fetch and cache public keys from a public key chain 280 of the proxy service 270. The cached public keys may have expiration dates. Peers 200A and/or 200B may compute a master secret key for one or more of the public keys. Using the keys, cipher text may be exchanged between peers 200A and 200B in privacy as illustrated in FIG. 27B.

[0975] The peer-to-peer platform may include one or more methods for providing data integrity in the peer-to-peer environment. These methods may be used to insure that what is sent is what is received. One embodiment may use a standard hash on data (e.g. Secure Hash Algorithm (SHA-1) as defined by the Secure Hash Standard of the Federal Information Processing Standards Publication 180-1). A weak form and/or a strong form may be used in embodiments. In one embodiment, the weak form may use a public key ring and symmetric master to sign data. This method may work best between two peers each having he other's public key. In one embodiment, the strong form may use a symmetric key algorithm such as RSA (Rivest-Shamir-Adleman) and certificate authorities. In one embodiment, the peer-to-peer platform may provide a proxy public certificate authority service. The authority service may create, sign and distribute certificates (e.g. X509 certificates) for all peers on a public key chain. In one embodiment, the proxy service's public key may be resident on each proxied peer. Other embodiments may utilize other integrity methods.

[0976]FIGS. 28A and 28B illustrate one embodiment of a method for using a peer-to-peer platform proxy service as a certificate authority. FIG. 28A illustrates a peer region 212 with several peers 200 and a proxy service 270. The proxy service 270 may distribute signed certificates in response to peer requests as required. The peers 200 may validate the proxy service 270 signature using a proxy service public key. As illustrated in FIG. 28B, when exchanging content with other peers 200, a peer 200 may sign the content with the destination peer's public key and distribute the cipher text.

[0977] Peer Monitoring and Metering

[0978] Peer monitoring may include the capability to closely keep track of a (local or remote) peer's status, to control the behavior of a peer, and to respond to actions on the part of a peer. These capabilities may be useful, for example, when a peer network wants to offer premium services with a number of desirable properties such as reliability, scalability, and guaranteed response time. For example, a failure in the peer system may be detected as soon as possible so that corrective actions can be taken. In one embodiment, an erratic peer may be shut down and its responsibilities transferred to another peer. Peer metering may include the capability to accurately account for a peer's activities, in particular its usage of valuable resources. Such a capability is essential if the network economy is to go beyond flat-rate services. Even for providers offering flat rate services, it is to their advantage to be able to collect data and analyze usage patterns in order to be convinced that a flat rate structure is sustainable and profitable. In one embodiment, the peer-to-peer platform may provide monitoring and metering through the peer information protocol, where a peer can query another peer for data such as up time and amount of data handled. Security is important in peer monitoring and metering. In one embodiment, a peer may choose to authenticate any command it receives. In one embodiment, a peer may decide to not answer queries from suspect sources.

[0979] Conclusion

[0980] Various embodiments may further include receiving, sending or storing instructions and/or data implemented in accordance with the foregoing description upon a carrier medium. Generally speaking, a carrier medium may include storage media or memory media such as magnetic or optical media, e.g., disk or CD-ROM, volatile or non-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc. as well as transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as network and/or a wireless link.

[0981] The various methods as illustrated in the Figures and described herein represent exemplary embodiments of methods. The methods may be implemented in software, hardware, or a combination thereof. The order of method may be changed, and various elements may be added, reordered, combined, omitted, modified, etc.

[0982] Various modifications and changes may be made as would be obvious to a person skilled in the art having the benefit of this disclosure. It is intended that the invention embrace all such modifications and changes and, accordingly, the above description to be regarded in an illustrative rather than a restrictive sense. 

What is claimed is:
 1. A peer-to-peer network system, comprising: a plurality of peer nodes; an initiating peer node configured to launch a mobile agent in the peer-to-peer network, wherein the mobile agent includes an itinerary indicating a subset of the plurality of peer nodes to be visited by the mobile agent, wherein the initiating peer node and the subset of the plurality of peer nodes are member peer nodes in a group of peer nodes in the peer-to-peer network; wherein the mobile agent is configured to visit one or more of the subset of the plurality of peer nodes indicated by the itinerary and to provide indications of the one or more visited peer nodes to the initiating peer node; and wherein the initiating peer node is further configured to update presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent.
 2. The peer-to-peer network system as recited in claim 1, wherein, to update presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent, the initiating peer node is further configured to indicate in the presence information that one or more of the peer nodes indicated by the itinerary and not visited by the mobile agent are not present in the group of peer nodes.
 3. The peer-to-peer network system as recited in claim 1, wherein, to update presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent, the initiating peer node is further configured to remove from the presence information indications that one or more of the subset of the plurality of peer nodes not visited by the mobile agent are present in the group of peer nodes.
 4. The peer-to-peer network system as recited in claim 1, wherein, to provide indications of the one or more visited peer nodes to the initiating peer node, the mobile agent is further configured to: store the indications of the one or more visited peer nodes as a payload of the mobile agent; and return the payload to the initiating peer node after visiting the one or more of the subset of the plurality of peer nodes indicated by the itinerary.
 5. The peer-to-peer network system as recited in claim 1, wherein, to launch a mobile agent in the peer-to-peer network, the initiating peer node is further configured to send the mobile agent to a first peer node indicated by the itinerary.
 6. The peer-to-peer network system as recited in claim 1, wherein each of the subset of the plurality of peer nodes indicated by the itinerary is configured to: receive the mobile agent from a previous peer node; store an indication that the mobile agent has visited the peer node in a payload of the mobile agent; and send the mobile agent to a next peer node indicated by the itinerary.
 7. The peer-to-peer network system as recited in claim 6, wherein the previous peer node is the initiating peer node.
 8. The peer-to-peer network system as recited in claim 6, wherein the next peer node is the initiating peer node.
 9. The peer-to-peer network system as recited in claim 1, wherein, to launch a mobile agent in the peer-to-peer network, the initiating peer node is further configured to: determine a first peer node indicated by the itinerary that is available to receive the mobile agent; and send the mobile agent to the first peer node.
 10. The peer-to-peer network system as recited in claim 1, wherein each of the subset of the plurality of peer nodes indicated by the itinerary is configured to: receive the mobile agent; select a target peer node that is available to receive the mobile agent from unvisited peer nodes in the subset of the plurality of peer nodes indicated by the itinerary; and send the mobile agent to the target peer node.
 11. The peer-to-peer network system as recited in claim 10, wherein each of the subset of the plurality of peer nodes indicated by the itinerary is further configured to, if the mobile agent has completed the itinerary, return the mobile agent to the initiating peer node.
 12. The peer-to-peer network system as recited in claim 1, wherein the initiating peer node is further configured to generate the itinerary from the presence information.
 13. The peer-to-peer network system as recited in claim 1, wherein peer nodes on the network are configured to implement a peer-to-peer environment according to a peer-to-peer platform comprising one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, form groups of peer nodes, and send and receive mobile agents in the peer-to-peer environment.
 14. A peer node, comprising: a processor; a memory comprising program instructions, wherein the program instructions are executable by the processor to launch a mobile agent in the peer-to-peer network, wherein the mobile agent includes an itinerary indicating a plurality of peer nodes to be visited by the mobile agent, wherein the peer node and the plurality of peer nodes are member peer nodes in a group of peer nodes in the peer-to-peer network; wherein the mobile agent is configured to visit one or more of the plurality of peer nodes indicated by the itinerary and to provide indications of the one or more visited peer nodes to the peer node; and wherein the program instructions are further executable by the processor to update presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent.
 15. The peer node as recited in claim 14, wherein, to update presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent, the program instructions are further executable by the processor to indicate in the presence information that one or more of the peer nodes indicated by the itinerary and not visited by the mobile agent are not present in the group of peer nodes.
 16. The peer node as recited in claim 14, wherein, to update presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent, the program instructions are further executable by the processor to remove from the presence information indications that one or more of the plurality of peer nodes not visited by the mobile agent are present in the group of peer nodes.
 17. The peer node as recited in claim 14, wherein, to provide indications of the one or more visited peer nodes to the peer node, the mobile agent is further configured to: store the indications of the one or more visited peer nodes as a payload of the mobile agent; and return the payload to the peer node after visiting the one or more of the plurality of peer nodes indicated by the itinerary.
 18. The peer node as recited in claim 14, wherein, to launch a mobile agent in the peer-to-peer network, the program instructions are further executable by the processor to send the mobile agent to a first peer node indicated by the itinerary.
 19. The peer node as recited in claim 14, wherein, to launch a mobile agent in the peer-to-peer network, the program instructions are further executable by the processor to: determine a first peer node indicated by the itinerary that is available to receive the mobile agent; and send the mobile agent to the first peer node.
 20. The peer node as recited in claim 14, wherein the program instructions are further executable by the processor to generate the itinerary from the presence information.
 21. The peer node as recited in claim 14, wherein the peer node is configured to participate in a peer-to-peer environment with other peer nodes according to a peer-to-peer platform comprising one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, form groups of peer nodes, and send and receive mobile agents to and from other peer nodes in the peer-to-peer environment.
 22. A method, comprising: an initiating peer node in a peer-to-peer network launching a mobile agent in the peer-to-peer network, wherein the mobile agent includes an itinerary indicating a plurality of peer nodes in the peer-to-peer network to be visited by the mobile agent, wherein the initiating peer node and the plurality of peer nodes are member peer nodes in a group of peer nodes in the peer-to-peer network; the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary; the mobile agent providing indications of the one or more visited peer nodes to the initiating peer node; and the initiating peer node updating presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent.
 23. The method as recited in claim 22, wherein the initiating peer node updating presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent comprises indicating in the presence information that one or more of the plurality of peer nodes not visited by the mobile agent are not present in the group of peer nodes.
 24. The method as recited in claim 22, wherein the initiating peer node updating presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent comprises removing from the presence information indications that one or more of the plurality of peer nodes not visited by the mobile agent are present in the group of peer nodes.
 25. The method as recited in claim 22, wherein the mobile agent providing indications of the one or more visited peer nodes to the initiating peer node comprises: the mobile agent storing the indications of the one or more visited peer nodes as a payload of the mobile agent; and the mobile agent returning the payload to the initiating peer node after visiting the one or more of the plurality of peer nodes indicated by the itinerary.
 26. The method as recited in claim 22, wherein an initiating peer node in a peer-to-peer network launching a mobile agent in the peer-to-peer network comprises the initiating peer node sending the mobile agent to a first peer node indicated by the itinerary.
 27. The method as recited in claim 22, wherein the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary comprises: one of the plurality of peer nodes indicated by the itinerary receiving the mobile agent from a previous peer node; storing an indication of the one of the plurality of peer nodes in a payload of the mobile agent; and the one of the plurality of peer nodes sending the mobile agent to a next peer node indicated by the itinerary.
 28. The method as recited in claim 27, wherein the previous peer node is the initiating peer node.
 29. The method as recited in claim 27, wherein the next peer node is the initiating peer node.
 30. The method as recited in claim 27, further comprising repeating said receiving, said storing, and said sending the mobile agent to a next peer node indicated by the itinerary until the itinerary is completed.
 31. The method as recited in claim 22, wherein an initiating peer node in a peer-to-peer network launching a mobile agent in the peer-to-peer network comprises: the initiating peer node determining a first peer node indicated by the itinerary that is available to receive the mobile agent; and the initiating peer node sending the mobile agent to the first peer node.
 32. The method as recited in claim 22, wherein the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary comprises: one of the plurality of peer nodes indicated by the itinerary receiving the mobile agent; selecting a next peer node indicated by the itinerary as a target peer node; determining if the target peer node is available to receive the mobile agent; if the target peer node is not available to receive the mobile agent: selecting a subsequent peer node as the target peer node; and repeating said determining if the target peer node is available to receive the mobile agent and said selecting a subsequent peer node as the target peer node until either determining the target peer node is available to receive the mobile agent or the itinerary is exhausted.
 33. The method as recited in claim 32, wherein the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary comprises, if the target peer node is available to receive the mobile agent, sending the mobile agent to the target peer node.
 34. The method as recited in claim 32, wherein the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary comprises, if the itinerary is exhausted, returning the mobile agent to the initiating peer node.
 35. The method as recited in claim 22, further comprising the initiating peer node generating the itinerary from the presence information.
 36. The method as recited in claim 22, wherein peer nodes in the peer-to-peer network are configured to implement a peer-to-peer environment according to a peer-to-peer platform comprising one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, form groups of peer nodes, and send and receive mobile agents in the peer-to-peer environment.
 37. A computer-accessible medium comprising program instructions, wherein the program instructions are configured to implement: an initiating peer node in a peer-to-peer network launching a mobile agent in the peer-to-peer network, wherein the mobile agent includes an itinerary indicating a plurality of peer nodes in the peer-to-peer network to be visited by the mobile agent, wherein the initiating peer node and the plurality of peer nodes are member peer nodes in a group of peer nodes in the peer-to-peer network; the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary; the mobile agent providing indications of the one or more visited peer nodes to the initiating peer node; and the initiating peer node updating presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent.
 38. The computer-accessible medium as recited in claim 37, wherein, in the initiating peer node updating presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent, the program instructions are further configured to implement indicating in the presence information that one or more of the plurality of peer nodes not visited by the mobile agent are not present in the group of peer nodes.
 39. The computer-accessible medium as recited in claim 37, wherein, in the initiating peer node updating presence information indicating presence of member peer nodes in the group of peer nodes in accordance with the indications of the one or more visited peer nodes provided by the mobile agent, the program instructions are further configured to implement removing from the presence information indications that one or more of the plurality of peer nodes not visited by the mobile agent are present in the group of peer nodes.
 40. The computer-accessible medium as recited in claim 37, wherein, in the mobile agent providing indications of the one or more visited peer nodes to the initiating peer node, the program instructions are further configured to implement: the mobile agent storing the indications of the one or more visited peer nodes as a payload of the mobile agent; and the mobile agent returning the payload to the initiating peer node after visiting the one or more of the plurality of peer nodes indicated by the itinerary.
 41. The computer-accessible medium as recited in claim 37, wherein, in an initiating peer node in a peer-to-peer network launching a mobile agent in the peer-to-peer network, the program instructions are further configured to implement the initiating peer node sending the mobile agent to a first peer node indicated by the itinerary.
 42. The computer-accessible medium as recited in claim 37, wherein, in the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary, the program instructions are further configured to implement: one of the plurality of peer nodes indicated by the itinerary receiving the mobile agent from a previous peer node; storing an indication of the one of the plurality of peer nodes in a payload of the mobile agent; and the one of the plurality of peer nodes sending the mobile agent to a next peer node indicated by the itinerary.
 43. The computer-accessible medium as recited in claim 42, wherein the previous peer node is the initiating peer node.
 44. The computer-accessible medium as recited in claim 42, wherein the next peer node is the initiating peer node.
 45. The computer-accessible medium as recited in claim 42, wherein the program instructions are further configured to implement repeating said receiving, said storing, and said sending the mobile agent to a next peer node indicated by the itinerary until the itinerary is completed.
 46. The computer-accessible medium as recited in claim 37, wherein, in an initiating peer node in a peer-to-peer network launching a mobile agent in the peer-to-peer network, the program instructions are further configured to implement: the initiating peer node determining a first peer node indicated by the itinerary that is available to receive the mobile agent; and the initiating peer node sending the mobile agent to the first peer node.
 47. The computer-accessible medium as recited in claim 37, wherein, in the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary, the program instructions are further configured to implement: one of the plurality of peer nodes indicated by the itinerary receiving the mobile agent; selecting a next peer node indicated by the itinerary as a target peer node; determining if the target peer node is available to receive the mobile agent; if the target peer node is not available to receive the mobile agent: selecting a subsequent peer node as the target peer node; and repeating said determining if the target peer node is available to receive the mobile agent and said selecting a subsequent peer node as the target peer node until either determining the target peer node is available to receive the mobile agent or the itinerary is exhausted.
 48. The computer-accessible medium as recited in claim 47, wherein, in the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary, the program instructions are further configured to implement, if the target peer node is available to receive the mobile agent, sending the mobile agent to the target peer node.
 49. The computer-accessible medium as recited in claim 47, wherein the mobile agent visiting one or more of the plurality of peer nodes indicated by the itinerary comprises, if the itinerary is exhausted, returning the mobile agent to the initiating peer node.
 50. The computer-accessible medium as recited in claim 37, wherein the program instructions are further configured to implement the initiating peer node generating the itinerary from the presence information.
 51. The computer-accessible medium as recited in claim 37, wherein peer nodes in the peer-to-peer network are configured to implement a peer-to-peer environment according to a peer-to-peer platform comprising one or more peer-to-peer platform protocols for enabling the peer nodes to discover each other, communicate with each other, form groups of peer nodes, and send and receive mobile agents in the peer-to-peer environment. 